src/Domain/Module/Subscriber/GroupCreatedEventSubscriber.php line 25
<?phpnamespace App\Domain\Module\Subscriber;use App\Domain\Auth\Event\GroupCreatedEvent;use App\Domain\Module\Service\ModuleService;use Symfony\Component\EventDispatcher\EventSubscriberInterface;class GroupCreatedEventSubscriber implements EventSubscriberInterface{private ModuleService $service;public function __construct(ModuleService $service){$this->service = $service;}public static function getSubscribedEvents(): array{return [GroupCreatedEvent::class => 'onCreated',];}public function onCreated(GroupCreatedEvent $event): void{$this->service->copyModules($event->getGroup());}}