Skip to content

Commit 32cd210

Browse files
Completing links to EventArgs classes in overview table
Questions: 1. Is https://github.com/doctrine/persistence/blob/master/lib/Doctrine/Persistence/Event/LifecycleEventArgs.php correct at all? Shouldn't this be https://github.com/doctrine/orm/blob/2.10.x/lib/Doctrine/ORM/Event/LifecycleEventArgs.php, like all the others? 2. Which one is correct for `preUpdate`? https://www.doctrine-project.org/projects/doctrine-orm/en/2.10/reference/events.html#entity-listeners-class says `PreUpdateEventArgs`, but https://www.doctrine-project.org/projects/doctrine-orm/en/2.10/reference/events.html#listening-and-subscribing-to-lifecycle-events says `LifecycleEventArgs` For the two links to `doctrine/persistence`, I'm linking to `/master/` now, which is being forwarded to `/2.2.x/`.
1 parent 77b7107 commit 32cd210

File tree

1 file changed

+40
-33
lines changed

1 file changed

+40
-33
lines changed

docs/en/reference/events.rst

Lines changed: 40 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -135,38 +135,38 @@ see :ref:`Lifecycle Callbacks<lifecycle-callbacks>`
135135
Events Overview
136136
---------------
137137

138-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
139-
| Event | Dispatched by | Lifecycle | Passed |
140-
| | | Callback | Argument |
141-
+=================================================================+=======================+===========+========================+
142-
| :ref:`preRemove<reference-events-pre-remove>` | ``$em->remove()`` | Yes | |
143-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
144-
| :ref:`postRemove<reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | |
145-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
146-
| :ref:`prePersist<reference-events-pre-persist>` | ``$em->persist()`` | Yes | `_LifecycleEventArgs`_ |
147-
| | on *initial* persist | | |
148-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
149-
| :ref:`postPersist<reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | |
150-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
151-
| :ref:`preUpdate<reference-events-pre-update>` | ``$em->flush()`` | Yes | |
152-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
153-
| :ref:`postUpdate<reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | |
154-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
155-
| :ref:`postLoad<reference-events-post-load>` | Loading from database | Yes | |
156-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
157-
| :ref:`loadClassMetadata<reference-events-load-class-metadata>` | Loading of mapping | No | |
158-
| | metadata | | |
159-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
160-
| ``onClassMetadataNotFound`` | ``MappingException`` | No | |
161-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
162-
| :ref:`preFlush<reference-events-pre-flush>` | ``$em->flush()`` | Yes | |
163-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
164-
| :ref:`onFlush<reference-events-on-flush>` | ``$em->flush()`` | No | |
165-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
166-
| :ref:`postFlush<reference-events-post-flush>` | ``$em->flush()`` | No | |
167-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
168-
| ``onClear`` | ``$em->clear()`` | No | |
169-
+-----------------------------------------------------------------+-----------------------+-----------+------------------------+
138+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
139+
| Event | Dispatched by | Lifecycle | Passed |
140+
| | | Callback | Argument |
141+
+=================================================================+=======================+===========+=====================================+
142+
| :ref:`preRemove<reference-events-pre-remove>` | ``$em->remove()`` | Yes | `_LifecycleEventArgs`_ |
143+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
144+
| :ref:`postRemove<reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | `_LifecycleEventArgs`_ |
145+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
146+
| :ref:`prePersist<reference-events-pre-persist>` | ``$em->persist()`` | Yes | `_LifecycleEventArgs`_ |
147+
| | on *initial* persist | | |
148+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
149+
| :ref:`postPersist<reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | `_LifecycleEventArgs`_ |
150+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
151+
| :ref:`preUpdate<reference-events-pre-update>` | ``$em->flush()`` | Yes | `_PreUpdateEventArgs`_ |
152+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
153+
| :ref:`postUpdate<reference-events-post-update-remove-persist>` | ``$em->flush()`` | Yes | `_LifecycleEventArgs`_ |
154+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
155+
| :ref:`postLoad<reference-events-post-load>` | Loading from database | Yes | `_LifecycleEventArgs`_ |
156+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
157+
| :ref:`loadClassMetadata<reference-events-load-class-metadata>` | Loading of mapping | No | `_LoadClassMetadataEventArgs` |
158+
| | metadata | | |
159+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
160+
| ``onClassMetadataNotFound`` | ``MappingException`` | No | `_OnClassMetadataNotFoundEventArgs` |
161+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
162+
| :ref:`preFlush<reference-events-pre-flush>` | ``$em->flush()`` | Yes | `_PreFlushEventArgs`_ |
163+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
164+
| :ref:`onFlush<reference-events-on-flush>` | ``$em->flush()`` | No | `_OnFlushEventArgs` |
165+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
166+
| :ref:`postFlush<reference-events-post-flush>` | ``$em->flush()`` | No | `_PostFlushEventArgs` |
167+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
168+
| ``onClear`` | ``$em->clear()`` | No | `_OnClearEventArgs` |
169+
+-----------------------------------------------------------------+-----------------------+-----------+-------------------------------------+
170170

171171
Naming convention
172172
~~~~~~~~~~~~~~~~~
@@ -1079,4 +1079,11 @@ and the EntityManager.
10791079
}
10801080
}
10811081
1082-
.. _LifecycleEventArgs: https://github.com/doctrine/persistence/blob/2.2.x/lib/Doctrine/Persistence/Event/LifecycleEventArgs.php
1082+
.. _LifecycleEventArgs: https://github.com/doctrine/persistence/blob/master/lib/Doctrine/Persistence/Event/LifecycleEventArgs.php
1083+
.. _PreUpdateEventArgs: https://github.com/doctrine/persistence/blob/master/lib/Doctrine/Persistence/Event/PreUpdateEventArgs.php
1084+
.. _PreFlushEventArgs: https://github.com/doctrine/orm/blob/2.10.x/lib/Doctrine/ORM/Event/PreFlushEventArgs.php
1085+
.. _PostFlushEventArgs: https://github.com/doctrine/orm/blob/2.10.x/lib/Doctrine/ORM/Event/PostFlushEventArgs.php
1086+
.. _OnFlushEventArgs: https://github.com/doctrine/orm/blob/2.10.x/lib/Doctrine/ORM/Event/OnFlushEventArgs.php
1087+
.. _OnClearEventArgs: https://github.com/doctrine/orm/blob/2.10.x/lib/Doctrine/ORM/Event/OnClearEventArgs.php
1088+
.. _LoadClassMetadataEventArgs: https://github.com/doctrine/orm/blob/2.10.x/lib/Doctrine/ORM/Event/LoadClassMetadataEventArgs.php
1089+
.. _OnClassMetadataNotFoundEventArgs: https://github.com/doctrine/orm/blob/2.10.x/lib/Doctrine/ORM/Event/OnClassMetadataNotFoundEventArgs.php

0 commit comments

Comments
 (0)