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
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 {
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}
An exception for terminatinating execution or to throw for unit testing.
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:17
Class ilPDGlobalScreenProvider.
Class ilStaffGlobalScreenProvider.
getTopItem()
Some other components want to provide Items for the main menu which are located at the PD TopTitem by...
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12