ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
LPMainBarProvider.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=0);
4 
6 
10 
16 {
20  public function getStaticTopItems(): array
21  {
22  return [];
23  }
24 
28  public function getStaticSubItems(): array
29  {
30  global $DIC;
31 
32  $title = $this->dic->language()->txt("mm_learning_progress");
33  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(
34  "trac",
35  $title
36  );
37  $ctrl = $DIC->ctrl();
38 
39  return [
40  $this->mainmenu->link($this->if->identifier('mm_pd_lp'))
41  ->withTitle($title)
42  ->withAction(
43  $ctrl->getLinkTargetByClass(
44  ["ilDashboardGUI",
45  "ilAchievementsGUI",
46  "ilLearningProgressGUI",
47  'ilLPListOfProgressGUI'
48  ]
49  )
50  )
51  ->withParent(
53  )->getAchievementsIdentification()
54  )
55  ->withPosition(30)
56  ->withSymbol($icon)
57  ->withNonAvailableReason(
58  $this->dic->ui()->factory()->legacy(
59  "{$this->dic->language()->txt('component_not_active')}"
60  )
61  )
63  function () {
66  }
67  ),
68  ];
69  }
70 }
if(!file_exists('../ilias.ini.php'))
withAvailableCallable(callable $is_available)
global $DIC
Definition: shib_login.php:25
withParent(IdentificationInterface $identification)