ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilStaffGlobalScreenProvider.php
Go to the documentation of this file.
1 <?php
2 
6 
13 {
14 
18  protected $top_item;
19 
20 
24  public function __construct(Container $dic)
25  {
26  parent::__construct($dic);
27  $this->top_item = (new ilPDGlobalScreenProvider($dic))->getTopItem();
28  }
29 
30 
38  public function getTopItem() : IdentificationInterface
39  {
40  return $this->top_item;
41  }
42 
43 
47  public function getStaticTopItems() : array
48  {
49  return [];
50  }
51 
52 
56  public function getStaticSubItems() : array
57  {
58  $dic = $this->dic;
59 
60  return [$this->mainmenu->link($this->if->identifier('mm_pd_mst'))
61  ->withTitle($this->dic->language()->txt("my_staff"))
62  ->withAction("ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToMyStaff")
63  ->withParent($this->getTopItem())
64  ->withPosition(12)
65  ->withAvailableCallable(
66  function () use ($dic) {
67  return (bool) ($dic->settings()->get("enable_my_staff"));
68  }
69  )
70  ->withVisibilityCallable(
71  function () {
72  return (bool) ilMyStaffAccess::getInstance()->hasCurrentUserAccessToMyStaff();
73  }
74  )->withNonAvailableReason($dic->ui()->factory()->legacy("{$dic->language()->txt('component_not_active')}"))];
75  }
76 }
getTopItem()
Some other components want to provide Items for the main menu which are located at the PD TopTitem by...
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:16
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
Class ilPDGlobalScreenProvider.
Class ilStaffGlobalScreenProvider.