We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c2e6db commit 88939deCopy full SHA for 88939de
doctrine/event_listeners_subscribers.rst
@@ -172,15 +172,16 @@ interface and have an event method for each event it subscribes to::
172
use Doctrine\Common\EventSubscriber;
173
// for Doctrine < 2.4: use Doctrine\ORM\Event\LifecycleEventArgs;
174
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
175
+ use Doctrine\ORM\Events;
176
use AppBundle\Entity\Product;
177
178
class SearchIndexerSubscriber implements EventSubscriber
179
{
180
public function getSubscribedEvents()
181
182
return array(
- \Doctrine\ORM\Events::postPersist => 'postPersist',
183
- \Doctrine\ORM\Events::postUpdate => 'postUpdate',
+ Events::postPersist,
184
+ Events::postUpdate,
185
);
186
}
187
0 commit comments