Skip to content

Commit 0924f5c

Browse files
committed
more reference to the doctrine documentation
1 parent 357ad55 commit 0924f5c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cookbook/doctrine/event_listeners_subscribers.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Doctrine defines two types of objects that can listen to Doctrine events:
1717
listeners and subscribers. Both are very similar, but listeners are a bit
1818
more straightforward. For more, see `The Event System`_ on Doctrine's website.
1919

20+
The Doctrine website also explains all existing events that can be listened to.
21+
2022
Configuring the Listener/Subscriber
2123
-----------------------------------
2224

@@ -167,6 +169,7 @@ interface and an event method for each event it subscribes to.
167169
168170
use Doctrine\Common\EventSubscriber;
169171
use Doctrine\ORM\Event\LifecycleEventArgs;
172+
// for doctrine 2.4: Doctrine\Common\Persistence\Event\LifecycleEventArgs;
170173
use Acme\StoreBundle\Entity\Product;
171174
172175
class SearchIndexerSubscriber implements EventSubscriber
@@ -209,5 +212,6 @@ interface and an event method for each event it subscribes to.
209212
names they subscribe to. Doctrine will then expect methods on the subscriber
210213
with the names of the subscribed events, just as when using an event listener.
211214

215+
For a full reference, see chapter `The Event System` in the doctrine documentation.
212216

213-
.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/reference/events.html
217+
.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html

0 commit comments

Comments
 (0)