diff --git a/docs/en/reference/architecture.rst b/docs/en/reference/architecture.rst index 6558c3ee8e7..6c005e43298 100644 --- a/docs/en/reference/architecture.rst +++ b/docs/en/reference/architecture.rst @@ -184,6 +184,8 @@ in well defined units of work. Work with your objects and modify them as usual and when you're done call ``EntityManager#flush()`` to make your changes persistent. +.. _unit-of-work: + The Unit of Work ~~~~~~~~~~~~~~~~ diff --git a/docs/en/reference/events.rst b/docs/en/reference/events.rst index eeb276d91d7..e2a9a6b8e96 100644 --- a/docs/en/reference/events.rst +++ b/docs/en/reference/events.rst @@ -127,9 +127,10 @@ Registering Events There are two ways to register an event: * *All events* can be registered by calling ``$eventManager->addEventListener()`` -or ``eventManager->addEventSubscriber()``, see :ref:`listening-and-subscribing-to-lifecycle-events` +or ``eventManager->addEventSubscriber()``, see +:ref:`Listening and subscribing to Lifecycle Events` * *Lifecycle Callbacks* can also be registered in the entity mapping (annotation, attribute, etc.), -see :ref:`lifecycle-callbacks` +see :ref:`Lifecycle Callbacks` Events Overview --------------- @@ -297,7 +298,7 @@ specific to a particular entity class's lifecycle. .. note:: - Note that Licecycle Callbacks are not supported for Embeddables. + Lifecycle Callbacks are not supported for :doc:`Embeddables `. .. code-block:: php @@ -462,7 +463,7 @@ behaviors across different entity classes. Note that they require much more detailed knowledge about the inner workings of the ``EntityManager`` and ``UnitOfWork`` classes. Please -read the :ref:`reference-events-implementing-listeners` section +read the :ref:`Implementing Event Listeners` section carefully if you are trying to write your own listener. For event subscribers, there are no surprises. They declare the diff --git a/docs/en/tutorials/getting-started.rst b/docs/en/tutorials/getting-started.rst index 1cb108668ca..7013fb2cdf7 100644 --- a/docs/en/tutorials/getting-started.rst +++ b/docs/en/tutorials/getting-started.rst @@ -642,7 +642,7 @@ Let's continue by creating a script to display the name of a product based on it echo sprintf("-%s\n", $product->getName()); Next we'll update a product's name, given its id. This simple example will -help demonstrate Doctrine's implementation of the UnitOfWork pattern. Doctrine +help demonstrate Doctrine's implementation of the :ref:`UnitOfWork pattern `. Doctrine keeps track of all the entities that were retrieved from the Entity Manager, and can detect when any of those entities' properties have been modified. As a result, rather than needing to call ``persist($entity)`` for each individual @@ -1334,7 +1334,7 @@ call this script as follows: php create_bug.php 1 1 1 See how simple it is to relate a Bug, Reporter, Engineer and Products? -Also recall that thanks to the UnitOfWork pattern, Doctrine will detect +Also recall that thanks to the :ref:`UnitOfWork pattern `, Doctrine will detect these relations and update all of the modified entities in the database automatically when ``flush()`` is called.