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

Support simplified event dispatching #529

Open
richardhj opened this issue Apr 26, 2020 · 1 comment
Open

Support simplified event dispatching #529

richardhj opened this issue Apr 26, 2020 · 1 comment
Assignees
Milestone

Comments

@richardhj
Copy link
Member

See https://symfony.com/blog/new-in-symfony-4-3-simpler-event-dispatching#supporting-both-dispatchers.

Taking the PostDeleteModelEvent as an exapmle:

$event = new PostDeleteModelEvent($environment, $model);
$this->dispatcher->dispatch($event, $event::NAME);

Target: DCG 2.2 / Contao 4.9 (Symfony >=4.3)

@zonky2 zonky2 added this to the 2.2.0 milestone Apr 26, 2020
@zonky2
Copy link
Contributor

zonky2 commented May 10, 2022

@discordier @davidmaack

is this implemented?
e.g.

// Trigger event after the model is deleted.
$postDeleteEvent = new PostDeleteModelEvent($environment, $model);
$environment->getEventDispatcher()->dispatch($postDeleteEvent, $postDeleteEvent::NAME);

@zonky2 zonky2 modified the milestones: 2.2.0, 2.3.0 May 11, 2022
@zonky2 zonky2 modified the milestones: 2.3.0, 2.3.1 Oct 31, 2023
@zonky2 zonky2 modified the milestones: 2.3.1, 2.2.3, 2.4.0 Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants