Craft 3, Craft 3, and Craft 3. Plus news, tips, plugins and more.
Let's hit the links.
Perfecting your technique
What’s the right way to add a custom event in Craft 3?
Several weeks ago, creating custom events in Craft 3 plugins was discussed. P&T’s Mailer.php was referenced as an example. Here are the basics of what you’d do.
1. Create an Event
2. Create an instance of that event in your code
$event = new YourEvent([
'entry' => $entry
3. Trigger the event: