ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
SkillMainBarProvider.php
Go to the documentation of this file.
1 <?php
2 
21 
26 use 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...
global $DIC
Definition: feed.php:28
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