Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing list "Lifecycle Events" #9243

Merged
merged 15 commits into from
Dec 28, 2021
Prev Previous commit
Remaining text
Everything was already mentioned elsewhere.
  • Loading branch information
ThomasLandauer authored Dec 12, 2021
commit 4dc4f0ab97a764f1cdeacd3e2921a21ac9239a28
34 changes: 2 additions & 32 deletions docs/en/reference/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ or ``eventManager->addEventSubscriber()``, see
* *Lifecycle Callbacks* can also be registered in the entity mapping (annotation, attribute, etc.),
see :ref:`Lifecycle Callbacks<lifecycle-callbacks>`

.. _reference-events-lifecycle-events:

Events Overview
---------------

Expand Down Expand Up @@ -187,38 +189,6 @@ several reasons:
An example for a correct notation can be found in the example
``TestEvent`` above.

.. _reference-events-lifecycle-events:

Lifecycle Events
----------------

The ``EntityManager`` and ``UnitOfWork`` classes trigger a bunch of
events during the life-time of their registered entities.





These can be hooked into by two different types of event
listeners:

- Lifecycle Callbacks are methods on the entity classes that are
called when the event is triggered. They receive some kind
of ``EventArgs`` instance.
- Lifecycle Event Listeners and Subscribers are classes with specific callback
methods that receives some kind of ``EventArgs`` instance.

The ``EventArgs`` instance received by the listener gives access to the entity,
``EntityManager`` instance and other relevant data.

.. note::

All Lifecycle events that happen during the ``flush()`` of
an ``EntityManager`` have very specific constraints on the allowed
operations that can be executed. Please read the
:ref:`reference-events-implementing-listeners` section very carefully
to understand which operations are allowed in which lifecycle event.
SenseException marked this conversation as resolved.
Show resolved Hide resolved

.. _lifecycle-callbacks:

Lifecycle Callbacks
Expand Down