@@ -19,23 +19,23 @@ |
||
| 19 | 19 | |
| 20 | 20 | /** @template-implements IEventListener<LoadAdditionalScriptsEvent> */ |
| 21 | 21 | class LoadAdditionalScriptsListener implements IEventListener { |
| 22 | - public function __construct( |
|
| 23 | - private IAppManager $appManager, |
|
| 24 | - private LoggerInterface $logger, |
|
| 25 | - ) { |
|
| 26 | - } |
|
| 27 | - |
|
| 28 | - public function handle(Event $event): void { |
|
| 29 | - if (!($event instanceof LoadAdditionalScriptsEvent)) { |
|
| 30 | - return; |
|
| 31 | - } |
|
| 32 | - |
|
| 33 | - if (!$this->appManager->isEnabledForUser(Application::APP_ID) |
|
| 34 | - || !$this->appManager->isEnabledForUser('notifications') |
|
| 35 | - ) { |
|
| 36 | - return; |
|
| 37 | - } |
|
| 38 | - |
|
| 39 | - Util::addInitScript(Application::APP_ID, 'init'); |
|
| 40 | - } |
|
| 22 | + public function __construct( |
|
| 23 | + private IAppManager $appManager, |
|
| 24 | + private LoggerInterface $logger, |
|
| 25 | + ) { |
|
| 26 | + } |
|
| 27 | + |
|
| 28 | + public function handle(Event $event): void { |
|
| 29 | + if (!($event instanceof LoadAdditionalScriptsEvent)) { |
|
| 30 | + return; |
|
| 31 | + } |
|
| 32 | + |
|
| 33 | + if (!$this->appManager->isEnabledForUser(Application::APP_ID) |
|
| 34 | + || !$this->appManager->isEnabledForUser('notifications') |
|
| 35 | + ) { |
|
| 36 | + return; |
|
| 37 | + } |
|
| 38 | + |
|
| 39 | + Util::addInitScript(Application::APP_ID, 'init'); |
|
| 40 | + } |
|
| 41 | 41 | } |