ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilAdmGlobalScreenProvider.php
Go to the documentation of this file.
1 <?php
2 
5 
12 {
13 
17  protected $top_item;
18 
19 
20  public function __construct(\ILIAS\DI\Container $dic)
21  {
22  parent::__construct($dic);
23  $this->top_item = $this->if->identifier('adm');
24  }
25 
26 
34  public function getTopItem() : IdentificationInterface
35  {
36  return $this->top_item;
37  }
38 
39 
43  public function getStaticTopItems() : array
44  {
45  $dic = $this->dic;
46 
47  return [$this->mainmenu->topParentItem($this->getTopItem())
48  ->withTitle($this->dic->language()->txt("administration"))
49  ->withPosition(3)
50  ->withVisibilityCallable(
51  function () use ($dic) {
52  return (bool) ($dic->access()->checkAccess('visible', '', SYSTEM_FOLDER_ID));
53  }
54  )];
55  }
56 
57 
61  public function getStaticSubItems() : array
62  {
63  $dic = $this->dic;
64 
65  $entries[] = $this->globalScreen()
66  ->mainmenu()
67  ->complex($this->if->identifier('adm_content'))
68  ->withAsyncContentURL("ilias.php?baseClass=ilAdministrationGUI&cmd=getDropDown&cmdMode=asynch")
69  ->withParent($this->getTopItem())
70  ->withAlwaysAvailable(true)
71  ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('item_must_be_always_active')}"))
72  ->withVisibilityCallable(
73  function () use ($dic) {
74  return (bool) ($dic->rbac()->system()->checkAccess("visible", SYSTEM_FOLDER_ID));
75  }
76  )->withAvailableCallable(
77  function () use ($dic) {
78  return ($dic->user()->getId() != ANONYMOUS_USER_ID);
79  }
80  );
81 
82  return $entries;
83  }
84 }
Class BaseForm.
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
Class HTTPServicesTest.
Class ilAdmGlobalScreenProvider.
getTopItem()
Some other components want to provide Items for the main menu which are located at the PD TopTitem by...