ILIAS  release_8 Revision v8.24
ContactMainBarProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ilContactGUI;
29
36{
40 public function getStaticTopItems(): array
41 {
42 return [];
43 }
44
45
49 public function getStaticSubItems(): array
50 {
51 $title = $this->dic->language()->txt("mm_contacts");
52
53 $icon = $this->dic->ui()->factory()
54 ->symbol()
55 ->icon()
56 ->standard(Standard::CADM, 'contacts');
57
58
59 return [
60 $this->mainmenu->link($this->if->identifier('mm_pd_contacts'))
61 ->withTitle($title)
62 ->withAction($this->dic->ctrl()->getLinkTargetByClass([ilDashboardGUI::class, ilContactGUI::class]))
63 ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification())
64 ->withPosition(20)
65 ->withSymbol($icon)
66 ->withNonAvailableReason($this->dic->ui()->factory()->legacy($this->dic->language()->txt('component_not_active')))
67 ->withAvailableCallable(
68 static function (): bool {
69 return ilBuddySystem::getInstance()->isEnabled();
70 }
71 ),
72 ];
73 }
74}
Class ilBuddySystem.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
This describes the specific behavior of an ILIAS standard icon.
Definition: Standard.php:27