ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
TaggingMainBarProvider.php
Go to the documentation of this file.
1<?php
2
19declare(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}
This describes the specific behavior of an ILIAS standard icon.
Definition: Standard.php:27
withParent(IdentificationInterface $identification)
if(!file_exists('../ilias.ini.php'))