ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
OrgUnitMainBarProvider.php
Go to the documentation of this file.
1 <?php namespace ILIAS\OrgUnit\Provider;
2 
6 use ilObjOrgUnit;
7 
13 {
14 
18  public function getStaticTopItems() : array
19  {
20  return [];
21  }
22 
26  public function getStaticSubItems() : array
27  {
28  $this->dic->language()->loadLanguageModule('mst');
29  $items = [];
30  $access_helper = BasicAccessCheckClosures::getInstance();
31  $top = StandardTopItemsProvider::getInstance()->getAdministrationIdentification();
32 
33  $title = $this->dic->language()->txt("objs_orgu");
34  $action = "ilias.php?baseClass=ilAdministrationGUI&ref_id=" . ilObjOrgUnit::getRootOrgRefId() . "&cmd=jump";
35  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard('orgu', $title)
36  ->withIsOutlined(true);
37 
38  $items[] = $this->mainmenu->link($this->if->identifier('mm_adm_orgu'))
39  ->withAlwaysAvailable(true)
40  ->withAction($action)
41  ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('item_must_be_always_active')}"))
42  ->withParent($top)
43  ->withTitle($title)
44  ->withSymbol($icon)
45  ->withPosition(75)
46  ->withVisibilityCallable(
47  $access_helper->hasAdministrationAccess(function () : bool {
48  return (bool) $this->dic->access()->checkAccess('read', '', ilObjOrgUnit::getRootOrgRefId());
49  }));
50 
51  return $items;
52  }
53 }
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
static getRootOrgRefId()