Skip to content

Commit 88939de

Browse files
committed
[symfony#10308] add use statement and fix array
1 parent 2c2e6db commit 88939de

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doctrine/event_listeners_subscribers.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,16 @@ interface and have an event method for each event it subscribes to::
172172
use Doctrine\Common\EventSubscriber;
173173
// for Doctrine < 2.4: use Doctrine\ORM\Event\LifecycleEventArgs;
174174
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
175+
use Doctrine\ORM\Events;
175176
use AppBundle\Entity\Product;
176177

177178
class SearchIndexerSubscriber implements EventSubscriber
178179
{
179180
public function getSubscribedEvents()
180181
{
181182
return array(
182-
\Doctrine\ORM\Events::postPersist => 'postPersist',
183-
\Doctrine\ORM\Events::postUpdate => 'postUpdate',
183+
Events::postPersist,
184+
Events::postUpdate,
184185
);
185186
}
186187

0 commit comments

Comments
 (0)