Skip to content

[Doctrine] Add precision for doctrine lifecycle callbacks #14613

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

Merged
merged 1 commit into from
Nov 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doctrine/events.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on other common tasks (e.g. ``loadClassMetadata``, ``onClear``).

There are different ways to listen to these Doctrine events:

* **Lifecycle callbacks**, they are defined as methods on the entity classes and
* **Lifecycle callbacks**, they are defined as public methods on the entity classes and
they are called when the events are triggered;
* **Lifecycle listeners and subscribers**, they are classes with callback
methods for one or more events and they are called for all entities;
Expand Down Expand Up @@ -46,7 +46,7 @@ to learn everything about them.
Doctrine Lifecycle Callbacks
----------------------------

Lifecycle callbacks are defined as methods inside the entity you want to modify.
Lifecycle callbacks are defined as public methods inside the entity you want to modify.
For example, suppose you want to set a ``createdAt`` date column to the current
date, but only when the entity is first persisted (i.e. inserted). To do so,
define a callback for the ``prePersist`` Doctrine event:
Expand Down