change method name
This commit is contained in:
parent
734a51891d
commit
dd53e60eff
|
@ -43,14 +43,14 @@ class MenuEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->translator = $translator;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity): bool
|
||||
{
|
||||
return $entity instanceof Menu;
|
||||
}
|
||||
|
||||
public function onPreUpdate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ class MenuEventSubscriber extends EntityManagerEventSubscriber
|
|||
|
||||
public function onCreate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,14 +24,14 @@ class NavigationEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->slugify = $slugify;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity): bool
|
||||
{
|
||||
return $entity instanceof Navigation;
|
||||
}
|
||||
|
||||
public function onPreUpdate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ class NodeEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->routeParameterSlugify = $routeParameterSlugify;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity): bool
|
||||
{
|
||||
return $entity instanceof Node;
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ class NodeEventSubscriber extends EntityManagerEventSubscriber
|
|||
|
||||
public function onPreUpdate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -159,7 +159,7 @@ class NodeEventSubscriber extends EntityManagerEventSubscriber
|
|||
|
||||
public function onDelete(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,14 +24,14 @@ class BlockEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->fileUpload = $fileUpload;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity): bool
|
||||
{
|
||||
return $entity instanceof Page;
|
||||
}
|
||||
|
||||
public function onPreUpdate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,14 +23,14 @@ class PageEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->fileUpload = $fileUpload;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity): bool
|
||||
{
|
||||
return $entity instanceof Page;
|
||||
}
|
||||
|
||||
public function onPreUpdate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,14 +27,14 @@ class SiteEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->cacheManager = $cacheManager;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity): bool
|
||||
{
|
||||
return $entity instanceof Node || $entity instanceof Menu || $entity instanceof Navigation;
|
||||
}
|
||||
|
||||
public function onUpdate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue