ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
PushNotificationMainBarProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28use ilSetting;
29
31{
32 public function getStaticTopItems(): array
33 {
34 return [];
35 }
36
37 public function getStaticSubItems(): array
38 {
39 $this->dic->language()->loadLanguageModule('notifications_adm');
40 return [
41 $this->mainmenu->link($this->if->identifier('mm_pd_push'))
42 ->withTitle($this->dic->language()->txt('push_settings'))
43 ->withAction($this->dic->ctrl()->getLinkTargetByClass([ilNotificationGUI::class, ilPersonalNotificationsSettingsGUI::class]))
44 ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification())
45 ->withPosition(60)
46 ->withSymbol($this->dic->ui()->factory()->symbol()->icon()->standard(Standard::NOTA, 'push_notification'))
47 ->withAvailableCallable(
48 static fn(): bool => ((new ilSetting('notifications'))->get('enable_push') === '1')
49 )
50 ];
51
52 }
53}
@ilCtrl_IsCalledBy ilPersonalNotificationsSettingsGUI: ilNotificationGUI
ILIAS Setting Class.
This describes the specific behavior of an ILIAS standard icon.
Definition: Standard.php:27
if(!file_exists('../ilias.ini.php'))