registerEventListener(LoadAdditionalScriptsEvent::class, LoadAdditionalScripts::class); $context->registerEventListener(SabrePluginAddEvent::class, SabrePluginAddListener::class); $context->registerService(AuthorizationService::class, function (ContainerInterface $c) { $service = new AuthorizationService($c->get(IUserSession::class)); $service->registerVoter($c->get(ResourceVoter::class)); return $service; }); } public function boot(IBootContext $context): void { } }