ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
BadgeMainBarProvider.php
Go to the documentation of this file.
1 <?php namespace ILIAS\Badge\Provider;
2 
6 
13 {
14 
18  public function getStaticTopItems() : array
19  {
20  return [];
21  }
22 
23 
27  public function getStaticSubItems() : array
28  {
29  $title = $this->dic->language()->txt("mm_badges");
30  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("bdga", $title)->withIsOutlined(true);
31 
32  return [
33  $this->mainmenu->link($this->if->identifier('mm_pd_badges'))
34  ->withTitle($title)
35  ->withAction("ilias.php?baseClass=ilDashboardGUI&cmd=jumpToBadges")
36  ->withPosition(40)
37  ->withParent(StandardTopItemsProvider::getInstance()->getAchievementsIdentification())
38  ->withSymbol($icon)
39  ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('component_not_active')}"))
40  ->withAvailableCallable(
41  function () {
42  return (bool) (ilBadgeHandler::getInstance()->isActive());
43  }
44  ),
45  ];
46  }
47 }
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
static getInstance()
Constructor.