ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
SkillMainBarProvider.php
Go to the documentation of this file.
1 <?php namespace ILIAS\Skill\Provider;
2 
7 use 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 }
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
global $DIC
Definition: goto.php:24