ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
NewsMainBarProvider.php
Go to the documentation of this file.
1 <?php
2 
4 
23 
30 {
31  public function getStaticTopItems(): array
32  {
33  return [];
34  }
35 
36  public function getStaticSubItems(): array
37  {
38  $dic = $this->dic;
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($this->dic->language()->txt('component_not_active')))
51  ->withAvailableCallable(
52  static function () use ($dic): bool {
53  return !($dic->settings()->get("block_activated_news") === null);
54  }
55  ),
56  ];
57  }
58 }
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
language()
Get interface to the i18n service.
Definition: Container.php:86
settings()
Get the interface to the settings.
Definition: Container.php:126