ILIAS  trunk Revision v11.0_alpha-1843-g9e1fad99175
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
TaggingMainBarProvider.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
26 
33 {
37  public function getStaticTopItems(): array
38  {
39  return [];
40  }
41 
42 
46  public function getStaticSubItems(): array
47  {
48  $title = $this->dic->language()->txt("mm_tags");
49  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::TAGS, $title);
50 
51  return [
52  $this->mainmenu->complex($this->if->identifier('tags'))
53  ->withAvailableCallable(function () {
54  $tags_set = new \ilSetting("tags");
55  return (bool) $tags_set->get("enable");
56  })
57  ->withTitle($title)
58  ->withSupportsAsynchronousLoading(true)
59  ->withSymbol($icon)
60  ->withContentWrapper(function () {
61  $tag_ui = new \ilTaggingSlateContentGUI();
62 
63  return $this->dic->ui()->factory()->legacy()->content($tag_ui->render());
64  })
65  ->withParent(StandardTopItemsProvider::getInstance()->getPersonalWorkspaceIdentification())
66  ->withPosition(20),
67  ];
68  }
69 }
if(!file_exists('../ilias.ini.php'))
withAvailableCallable(callable $is_available)
withParent(IdentificationInterface $identification)