ILIAS  release_7 Revision v7.30-3-g800a261c036
SkillMainBarProvider.php
Go to the documentation of this file.
2
7use ilSetting;
8
15{
16
20 public function getStaticTopItems() : array
21 {
22 return [];
23 }
24
25
29 public function getStaticSubItems() : array
30 {
31 global $DIC;
32
33 $title = $this->dic->language()->txt("mm_skills");
34 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("skmg", $title)->withIsOutlined(true);
35 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::SKMG, $title)->withIsOutlined(true);
36
37 $ctrl = $DIC->ctrl();
38 return [
39 $this->mainmenu->link($this->if->identifier('mm_pd_skill'))
40 ->withTitle($title)
41 ->withAction($ctrl->getLinkTargetByClass(["ilDashboardGUI", "ilAchievementsGUI","ilPersonalSkillsGUI"]))
42 ->withParent(StandardTopItemsProvider::getInstance()->getAchievementsIdentification())
43 ->withPosition(20)
44 ->withSymbol($icon)
45 ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('component_not_active')}"))
46 ->withAvailableCallable(
47 function () {
48 $skmg_set = new ilSetting("skmg");
49
50 return (bool) ($skmg_set->get("enable_skmg"));
51 }
52 ),
53 ];
54 }
55}
An exception for terminatinating execution or to throw for unit testing.
ILIAS Setting Class.
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
global $DIC
Definition: goto.php:24
This describes how an icon could be modified during construction of UI.
Definition: Icon.php:10
This describes the specific behavior of an ILIAS standard icon.
Definition: Standard.php:11