Event Reference
How to Subscribe to Events
<?php
namespace Plugins\MyPlugin\EventSubscriber;
use App\Core\Event\User\UserRegisteredEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class MyEventSubscriber implements EventSubscriberInterface
{
public static function getSubscribedEvents(): array
{
return [
UserRegisteredEvent::class => 'onUserRegistered',
];
}
public function onUserRegistered(UserRegisteredEvent $event): void
{
$userId = $event->getUserId();
// Your plugin logic here
}
}Event Categories
Category
Namespace
Description
Core Event Patterns
Stoppable Events (Pre-Events)
Mutable Events
Collection Events
Event Priority
Creating Custom Events
Related Guides
Last updated