From b97e79c7772ddd41173f26a07406f7f084cb1c32 Mon Sep 17 00:00:00 2001 From: Slava Fomin Date: Sun, 2 Feb 2014 18:51:34 +0300 Subject: [PATCH 1/3] Added tip for Entity Listeners --- cookbook/doctrine/event_listeners_subscribers.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cookbook/doctrine/event_listeners_subscribers.rst b/cookbook/doctrine/event_listeners_subscribers.rst index fb1274a38a7..4961ae00aa8 100644 --- a/cookbook/doctrine/event_listeners_subscribers.rst +++ b/cookbook/doctrine/event_listeners_subscribers.rst @@ -154,6 +154,12 @@ specific type of entity (e.g. a ``Product`` entity but not a ``BlogPost`` entity), you should check for the entity's class type in your method (as shown above). +.. tip:: + + Starting from version 2.4 Doctrine has a feature called `Entity Listeners`_ + which is a lifecycle listener class used for an entity. You can read about + it in Doctrine documentation. + Creating the Subscriber Class ----------------------------- @@ -211,3 +217,4 @@ interface and have an event method for each event it subscribes to:: For a full reference, see chapter `The Event System`_ in the Doctrine documentation. .. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html +.. _`Entity Listeners`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#entity-listeners From b53e1787c418f7176b20fba1a76d1c7fd570634d Mon Sep 17 00:00:00 2001 From: Slava Fomin Date: Mon, 3 Feb 2014 13:27:50 +0300 Subject: [PATCH 2/3] Fixed typo --- cookbook/doctrine/event_listeners_subscribers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/doctrine/event_listeners_subscribers.rst b/cookbook/doctrine/event_listeners_subscribers.rst index 4961ae00aa8..bd045aab921 100644 --- a/cookbook/doctrine/event_listeners_subscribers.rst +++ b/cookbook/doctrine/event_listeners_subscribers.rst @@ -158,7 +158,7 @@ entity), you should check for the entity's class type in your method Starting from version 2.4 Doctrine has a feature called `Entity Listeners`_ which is a lifecycle listener class used for an entity. You can read about - it in Doctrine documentation. + it in the Doctrine documentation. Creating the Subscriber Class ----------------------------- From 65649aa712cee26d9b8a99b44313def11e42ab71 Mon Sep 17 00:00:00 2001 From: Slava Fomin Date: Tue, 11 Feb 2014 08:39:44 +0300 Subject: [PATCH 3/3] Update event_listeners_subscribers.rst --- cookbook/doctrine/event_listeners_subscribers.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbook/doctrine/event_listeners_subscribers.rst b/cookbook/doctrine/event_listeners_subscribers.rst index bd045aab921..bd1f322d0b3 100644 --- a/cookbook/doctrine/event_listeners_subscribers.rst +++ b/cookbook/doctrine/event_listeners_subscribers.rst @@ -156,9 +156,9 @@ entity), you should check for the entity's class type in your method .. tip:: - Starting from version 2.4 Doctrine has a feature called `Entity Listeners`_ - which is a lifecycle listener class used for an entity. You can read about - it in the Doctrine documentation. + In Doctrine 2.4, a feature called Entity Listeners was introduced. + It is a lifecycle listener class used for an entity. You can read + about it in `the Doctrine Documentation`_. Creating the Subscriber Class ----------------------------- @@ -217,4 +217,4 @@ interface and have an event method for each event it subscribes to:: For a full reference, see chapter `The Event System`_ in the Doctrine documentation. .. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html -.. _`Entity Listeners`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#entity-listeners +.. _`the Doctrine Documentation`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html#entity-listeners