change method name
This commit is contained in:
parent
10128648d9
commit
e8cd93a3ac
|
@ -22,14 +22,14 @@ class CategoryEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->slugify = $slugify;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity)
|
||||
{
|
||||
return $entity instanceof Category;
|
||||
}
|
||||
|
||||
public function onPreUpdate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -39,14 +39,14 @@ class CommentEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->siteRequest = $siteRequest;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity)
|
||||
{
|
||||
return $entity instanceof Comment;
|
||||
}
|
||||
|
||||
public function onCreate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,14 +29,14 @@ class PostEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->slugify = $slugify;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity)
|
||||
{
|
||||
return $entity instanceof Post;
|
||||
}
|
||||
|
||||
public function onUpdate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ class PostEventSubscriber extends EntityManagerEventSubscriber
|
|||
|
||||
public function onDelete(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ class PostEventSubscriber extends EntityManagerEventSubscriber
|
|||
|
||||
public function onPreUpdate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,14 +35,14 @@ class PostFollowEventSubscriber extends EntityManagerEventSubscriber
|
|||
$this->siteRequest = $siteRequest;
|
||||
}
|
||||
|
||||
public function support(EntityInterface $entity)
|
||||
public function supports(EntityInterface $entity)
|
||||
{
|
||||
return $entity instanceof PostFollow;
|
||||
}
|
||||
|
||||
public function onCreate(EntityManagerEvent $event)
|
||||
{
|
||||
if (!$this->support($event->getEntity())) {
|
||||
if (!$this->supports($event->getEntity())) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue