ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
LPMainBarProvider.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=0);
20 
22 
24 use ilDashboardGUI;
28 use ilLPPersonalGUI;
29 
35 {
39  public function getStaticTopItems(): array
40  {
41  return [];
42  }
43 
47  public function getStaticSubItems(): array
48  {
49  global $DIC;
50 
51  $title = $this->dic->language()->txt("mm_learning_progress");
52  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(
53  "trac",
54  $title
55  );
56  $ctrl = $DIC->ctrl();
57 
58  return [
59  $this->mainmenu->link($this->if->identifier('mm_pd_lp'))
60  ->withTitle($title)
61  ->withAction(
62  $ctrl->getLinkTargetByClass(
63  [
64  ilDashboardGUI::class,
65  ilAchievementsGUI::class,
66  ilLPPersonalGUI::class
67  ]
68  )
69  )
70  ->withParent(
72  )->getAchievementsIdentification()
73  )
74  ->withPosition(30)
75  ->withSymbol($icon)
76  ->withNonAvailableReason(
77  $this->dic->ui()->factory()->legacy()->content(
78  "{$this->dic->language()->txt('component_not_active')}"
79  )
80  )
82  function () {
85  }
86  ),
87  ];
88  }
89 }
if(!file_exists('../ilias.ini.php'))
withAvailableCallable(callable $is_available)
global $DIC
Definition: shib_login.php:22
withParent(IdentificationInterface $identification)