ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ILIAS\MyStaff\Provider\StaffMainBarProvider Class Reference

Class StaffMainBarProvider. More...

+ Inheritance diagram for ILIAS\MyStaff\Provider\StaffMainBarProvider:
+ Collaboration diagram for ILIAS\MyStaff\Provider\StaffMainBarProvider:

Public Member Functions

 getStaticTopItems ()
 @inheritDoc More...
 
 getStaticSubItems ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getAllIdentifications ()
 @inheritDoc More...
 
 provideTypeInformation ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getStaticTopItems ()
 
 getStaticSubItems ()
 
 provideTypeInformation ()
 
 getAllIdentifications ()
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
 $dic
 
 $if
 
 $mainmenu
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 $dic
 

Detailed Description

Member Function Documentation

◆ getStaticSubItems()

ILIAS\MyStaff\Provider\StaffMainBarProvider::getStaticSubItems ( )

@inheritDoc

Implements ILIAS\GlobalScreen\Scope\MainMenu\Provider\StaticMainMenuProvider.

Definition at line 39 of file StaffMainBarProvider.php.

39 : array
40 {
41 $this->dic->language()->loadLanguageModule('mst');
43 $items = [];
44 $top = StandardTopItemsProvider::getInstance()->getOrganisationIdentification();
45
46 $title = $this->dic->language()->txt("mm_staff_list");
47 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(ilUtil::getImagePath("outlined/icon_stff.svg"), $title);
48
49 // My Staff
50 $items[] = $this->mainmenu->link($this->if->identifier('mm_pd_mst'))
51 ->withSymbol($icon)
52 ->withTitle($title)
53 ->withAction($this->dic->ctrl()->getLinkTargetByClass([
54 ilDashboardGUI::class,
55 ilMyStaffGUI::class,
56 ilMStListUsersGUI::class,
58 ->withParent($top)
59 ->withPosition(10)
60 ->withAvailableCallable(
61 static function () use ($dic) {
62 return (bool) ($dic->settings()->get('enable_my_staff'));
63 }
64 )
65 ->withVisibilityCallable(
66 static function () {
67 return (bool) ilMyStaffAccess::getInstance()->hasCurrentUserAccessToMyStaff();
68 }
69 )->withNonAvailableReason($dic->ui()->factory()->legacy("{$dic->language()->txt('component_not_active')}"));
70
71 $title = $this->dic->language()->txt("mm_enrolments");
72 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(ilUtil::getImagePath("outlined/icon_enrl.svg"), $title);
73
74 // My Enrolments
75 $items[] = $this->mainmenu->link($this->if->identifier('mm_pd_enrol'))
76 ->withSymbol($icon)
77 ->withTitle($title)
78 ->withAction($this->dic->ctrl()->getLinkTargetByClass([
79 ilDashboardGUI::class,
80 ilMyStaffGUI::class,
81 ilMStListCoursesGUI::class,
83 ->withParent($top)
84 ->withPosition(20)
85 ->withAvailableCallable(
86 function () use ($dic) {
87 return (bool) ($dic->settings()->get("enable_my_staff"));
88 }
89 )
90 ->withVisibilityCallable(
91 function () {
92 return (bool) ilMyStaffAccess::getInstance()->hasCurrentUserAccessToMyStaff();
93 }
94 )->withNonAvailableReason($dic->ui()->factory()->legacy("{$dic->language()->txt('component_not_active')}"));
95
96 // My Certificates
97 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::CERT, $title)->withIsOutlined(true);
98 $items[] = $this->mainmenu->link($this->if->identifier("mm_pd_cert"))
99 ->withSymbol($icon)
100 ->withTitle($this->dic->language()->txt("mm_certificates"))
101 ->withAction($this->dic->ctrl()->getLinkTargetByClass([
102 ilDashboardGUI::class,
103 ilMyStaffGUI::class,
104 ilMStListCertificatesGUI::class,
106 ->withParent($top)
107 ->withPosition(30)
108 ->withAvailableCallable(
109 function () : bool {
110 return boolval($this->dic->settings()->get("enable_my_staff"));
111 }
112 )
113 ->withVisibilityCallable(
114 function () : bool {
115 return boolval(ilMyStaffAccess::getInstance()->hasCurrentUserAccessToCertificates());
116 }
117 )->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt("component_not_active")}"));
118
119
120 // My Competences
121 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::SKMG, $title)->withIsOutlined(true);
122 $items[] = $this->mainmenu->link($this->if->identifier("mm_pd_comp"))
123 ->withSymbol($icon)
124 ->withTitle($this->dic->language()->txt("mm_skills"))
125 ->withAction($this->dic->ctrl()->getLinkTargetByClass([
126 ilDashboardGUI::class,
127 ilMyStaffGUI::class,
128 ilMStListCompetencesGUI::class,
130 ->withParent($top)
131 ->withPosition(30)
132 ->withAvailableCallable(
133 function () : bool {
134 return boolval($this->dic->settings()->get("enable_my_staff"));
135 }
136 )
137 ->withVisibilityCallable(
138 function () : bool {
139 return boolval(ilMyStaffAccess::getInstance()->hasCurrentUserAccessToCompetences());
140 }
141 )->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt("component_not_active")}"));
142
143
144 return $items;
145 }
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
withSymbol(Symbol $symbol)
@inheritDoc

References ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider\$dic, ILIAS\UI\Component\Symbol\Icon\Standard\CERT, ilMStListCertificatesGUI\CMD_INDEX, ilMStListCompetencesGUI\CMD_INDEX, ilMStListCoursesGUI\CMD_INDEX, ilMStListUsersGUI\CMD_INDEX, ilUtil\getImagePath(), ILIAS\MainMenu\Provider\StandardTopItemsProvider\getInstance(), ILIAS\MyStaff\ilMyStaffAccess\getInstance(), if, ILIAS\UI\Component\Symbol\Icon\Standard\SKMG, and ILIAS\GlobalScreen\Scope\MainMenu\Factory\withSymbol().

+ Here is the call graph for this function:

◆ getStaticTopItems()

ILIAS\MyStaff\Provider\StaffMainBarProvider::getStaticTopItems ( )

@inheritDoc

Implements ILIAS\GlobalScreen\Scope\MainMenu\Provider\StaticMainMenuProvider.

Definition at line 30 of file StaffMainBarProvider.php.

30 : array
31 {
32 return [];
33 }

The documentation for this class was generated from the following file: