ILIAS  release_8 Revision v8.24
SkillMainBarProvider.php
Go to the documentation of this file.
1<?php
2
21
26use ilSetting;
27
34{
38 public function getStaticTopItems(): array
39 {
40 return [];
41 }
42
43
47 public function getStaticSubItems(): array
48 {
49 global $DIC;
50
51 $title = $this->dic->language()->txt("mm_skills");
52 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("skmg", $title);
53 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::SKMG, $title);
54
55 $ctrl = $DIC->ctrl();
56 $ctrl->clearParametersByClass("ilPersonalSkillsGUI");
57 $ctrl->setParameterByClass("ilPersonalSkillsGUI", "list_mode", \ilPersonalSkillsGUI::LIST_PROFILES);
58 $link = $ctrl->getLinkTargetByClass(["ilDashboardGUI", "ilAchievementsGUI", "ilPersonalSkillsGUI"]);
59 $ctrl->clearParameterByClass("ilPersonalSkillsGUI", "list_mode");
60 return [
61 $this->mainmenu->link($this->if->identifier('mm_pd_skill'))
62 ->withTitle($title)
63 ->withAction($link)
64 ->withParent(StandardTopItemsProvider::getInstance()->getAchievementsIdentification())
65 ->withPosition(20)
66 ->withSymbol($icon)
67 ->withNonAvailableReason($this->dic->ui()->factory()->legacy($this->dic->language()->txt('component_not_active')))
68 ->withAvailableCallable(
69 static function (): bool {
70 $skmg_set = new ilSetting("skmg");
71
72 return (bool) ($skmg_set->get("enable_skmg"));
73 }
74 ),
75 ];
76 }
77}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
global $DIC
Definition: feed.php:28
This describes how an icon could be modified during construction of UI.
Definition: Icon.php:29
This describes the specific behavior of an ILIAS standard icon.
Definition: Standard.php:27
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...