ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
NewsMainBarProvider.php
Go to the documentation of this file.
1<?php
2
20
23
30{
31 public function getStaticTopItems(): array
32 {
33 return [];
34 }
35
36 public function getStaticSubItems(): array
37 {
39
40 $title = $this->dic->language()->txt("mm_news");
41 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("nwss", $title);
42
43 return [
44 $this->mainmenu->link($this->if->identifier('mm_pd_news'))
45 ->withTitle($title)
46 ->withAction("ilias.php?baseClass=ilDashboardGUI&cmd=jumpToNews")
47 ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification())
48 ->withPosition(30)
49 ->withSymbol($icon)
50 ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active')))
51 ->withAvailableCallable(
52 static function () use ($dic): bool {
53 return (bool) $dic->settings()->get("block_activated_news");
54 }
55 ),
56 ];
57 }
58}
language()
Get interface to the i18n service.
Definition: Container.php:95
settings()
Get the interface to the settings.
Definition: Container.php:135
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))