ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
CertificateMainBarProvider.php
Go to the documentation of this file.
1 <?php namespace ILIAS\Certificate\Provider;
2 
7 
14 {
15 
19  public function getStaticTopItems() : array
20  {
21  return [];
22  }
23 
24 
28  public function getStaticSubItems() : array
29  {
30  global $DIC;
31 
32  $title = $this->dic->language()->txt("mm_certificates");
33  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("cert", $title)->withIsOutlined(true);
34 
35  $ctrl = $DIC->ctrl();
36  return [
37  $this->mainmenu->link($this->if->identifier('mm_cert'))
38  ->withTitle($title)
39  ->withAction($ctrl->getLinkTargetByClass(["ilDashboardGUI",
40  "ilAchievementsGUI","ilUserCertificateGUI"]))
41  ->withParent(StandardTopItemsProvider::getInstance()->getAchievementsIdentification())
42  ->withVisibilityCallable(
43  static function () : bool {
44  return (
45  (BasicAccessCheckClosures::getInstance()->isUserLoggedIn())() &&
46  (new ilCertificateActiveValidator())->validate()
47  );
48  }
49  )
50  ->withSymbol($icon)
51  ->withPosition(50),
52  ];
53  }
54 }
if(!file_exists(getcwd() . '/ilias.ini.php'))
registration confirmation script for ilias
Definition: confirmReg.php:12
global $DIC
Definition: goto.php:24