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

Update examples in entity listeners documentation #906

Merged
merged 1 commit into from Feb 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions Resources/doc/entity-listeners.rst
Expand Up @@ -14,7 +14,10 @@ entity manager it should be registered with. Example:
user_listener:
class: \UserListener
tags:
- { name: doctrine.orm.entity_listener }
-
name: doctrine.orm.entity_listener
event: postPersist
entity: App\Entity\User
-
name: doctrine.orm.entity_listener
event: preUpdate
Expand All @@ -29,7 +32,11 @@ entity manager it should be registered with. Example:

<services>
<service id="user_listener" class="UserListener">
<tag name="doctrine.orm.entity_listener" event="preUpdate" entity="App\Entity\User" />
<tag
name="doctrine.orm.entity_listener"
event="postPersist"
entity="App\Entity\User"
/>
<tag
name="doctrine.orm.entity_listener"
event="preUpdate"
Expand Down