ILIAS  trunk Revision v11.0_alpha-1702-gfd3ecb7f852
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
LearningHistoryMainBarProvider.php
Go to the documentation of this file.
1 <?php
2 
19 namespace ILIAS\LearningHistory;
20 
26 use ilDashboardGUI;
27 
33 {
34  public function getStaticTopItems(): array
35  {
36  return [];
37  }
38 
39  public function getStaticSubItems(): array
40  {
41  global $DIC;
42 
43  $entries = [];
44 
45  $settings = $DIC->settings();
46 
47  $title = $this->dic->language()->txt("mm_learning_history");
48  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::LHTS, $title);
49 
50  $entries[] = $this->mainmenu->link($this->if->identifier('learning_history'))
51  ->withTitle($title)
52  ->withAction($this->dic->ctrl()->getLinkTargetByClass([
53  ilDashboardGUI::class,
54  ilAchievementsGUI::class,
55  ilLearningHistoryGUI::class,
56  ], ""))
57  ->withParent(StandardTopItemsProvider::getInstance()->getAchievementsIdentification())
58  ->withPosition(10)
59  ->withSymbol($icon)
60  ->withAvailableCallable(
61  static function () use ($settings): bool {
62  return (bool) $settings->get("enable_learning_history");
63  }
64  );
65 
66  return $entries;
67  }
68 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists('../ilias.ini.php'))
global $DIC
Definition: shib_login.php:22
withParent(IdentificationInterface $identification)