Skip to content

Commit

Permalink
Merge pull request #906 from YetiCGN/patch-1
Browse files Browse the repository at this point in the history
Update examples in entity listeners documentation
  • Loading branch information
alcaeus committed Feb 3, 2019
2 parents 891b58b + 568caa6 commit ae68d54
Showing 1 changed file with 9 additions and 2 deletions.
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 @@ -30,7 +33,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

0 comments on commit ae68d54

Please sign in to comment.