File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ public function onAfterDispatch(ControllerEvent $e): void
101101 }
102102```
103103
104- So every time the ` updateAction ` is accessed and the method is post,
104+ So every time the ` updateAction ` is accessed and the method is post,
105105right after the action is dispatched, we can log that the user was updated.
106106
107107We can use the ` onBeforeDispatch ` in the same way, to log right before the user is updated.
@@ -136,8 +136,8 @@ class UserUpdatedListener implements ControllerEventListenerInterface
136136}
137137```
138138
139- The ` attach ` method is from the ` ListenerAggregateInterface ` which ` ControllerEventListenerTrait `
140- already is overriding it so can be used in a global way with ` onBeforeDispatch ` and ` onAfterDispatch `
139+ The ` attach ` method is from the ` ListenerAggregateInterface ` which ` ControllerEventListenerTrait `
140+ already is overriding it so can be used in a global way with ` onBeforeDispatch ` and ` onAfterDispatch `
141141methods, but we can make our custom event and bind it to our method.
142142
143143In this case we create attach an event called ` user.profile.update ` and bind it to the ` userProfileUpdated ` method.
You can’t perform that action at this time.
0 commit comments