ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
NewsMainBarProvider.php
Go to the documentation of this file.
2
5
12{
13
17 public function getStaticTopItems() : array
18 {
19 return [];
20 }
21
22
26 public function getStaticSubItems() : array
27 {
29
30 $title = $this->dic->language()->txt("mm_news");
31 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("nwss", $title)->withIsOutlined(true);
32
33 return [
34 $this->mainmenu->link($this->if->identifier('mm_pd_news'))
35 ->withTitle($title)
36 ->withAction("ilias.php?baseClass=ilDashboardGUI&cmd=jumpToNews")
37 ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification())
38 ->withPosition(30)
39 ->withSymbol($icon)
40 ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('component_not_active')}"))
41 ->withAvailableCallable(
42 function () use ($dic) {
43 return ($dic->settings()->get("block_activated_news"));
44 }
45 ),
46 ];
47 }
48}
An exception for terminatinating execution or to throw for unit testing.
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12