docs: Port "Event dispatcher" service page to 7.2#588
docs: Port "Event dispatcher" service page to 7.2#588promptless-for-oss wants to merge 1 commit into
Conversation
| .. vale on No newline at end of file | ||
| .. vale on | ||
|
|
||
| Use the event dispatcher to dispatch your Plugin's custom events. Inject ``Symfony\Component\EventDispatcher\EventDispatcherInterface`` into your service, and always type-hint the interface since the concrete class can differ between environments: |
There was a problem hiding this comment.
Ported the legacy _plugin_services_event_dispatcher.md content per issue #351/#350: kept the event_dispatcher service and its HelloWorldEvents::ARMAGEDDON / ArmageddonEvent example, but modernized it to inject Symfony\Component\EventDispatcher\EventDispatcherInterface and use the Mautic 7 dispatch(event, name) argument order instead of the legacy dispatch(name, event) order.
There was a problem hiding this comment.
(Line 47)
Reused the already-reviewed 7.1 port of this page as the source content for the 7.2 base branch, matching the team's decision in the Slack thread to author against 7.2 using the 7.1 issue content. Repointed the Custom events cross-reference to a new dispatch custom events label in plugins/event_listeners.rst because plugin_miscellaneous/events.rst is still a placeholder stub on 7.2 and has no such section anchor.
Open this suggestion in Promptless to view citations and reasoning process
Ports the "Event dispatcher" plugin service page from the legacy dev docs into RST on the 7.2 base branch (issue #351, content from 7.1 source). Replaces the placeholder note with a modern Mautic 7 example that injects EventDispatcherInterface and uses the current dispatch() argument order, plus a cross-reference to the Custom events section. Adds a label anchor to plugins/event_listeners.rst so the cross-reference resolves.
Trigger Events
blockedlabel is to set content, structure, and tone in one branch, then backport/cherry pick i...Tip: See how your feedback shapes Promptless in Agent Knowledge Base 🧠