ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
MailMainBarProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\Mail\Provider;
22
27
29{
30 public function getStaticTopItems(): array
31 {
32 return [];
33 }
34
35 public function getStaticSubItems(): array
36 {
38
39 $title = $this->dic->language()->txt('mm_mail');
40 $icon = $this->dic->ui()->factory()
41 ->symbol()
42 ->icon()
43 ->standard(Standard::MAIL, $title);
44
45 return [
46 $this->mainmenu->link($this->if->identifier('mm_pd_mail'))
47 ->withTitle($title)
48 ->withAction('ilias.php?baseClass=ilMailGUI')
49 ->withParent(StandardTopItemsProvider::getInstance()->getCommunicationIdentification())
50 ->withPosition(10)
51 ->withSymbol($icon)
52 ->withNonAvailableReason(
53 $this->dic->ui()->factory()->legacy()->content($this->dic->language()->txt('component_not_active'))
54 )
55 ->withAvailableCallable(
56 static fn(): bool => !$dic->user()->isAnonymous() && $dic->user()->getId() !== 0
57 )
58 ->withVisibilityCallable(
59 static fn(): bool => $dic->rbac()->system()->checkAccess(
60 'internal_mail',
62 )
63 ),
64 ];
65 }
66}
user()
Get the current user.
Definition: Container.php:71
language()
Get interface to the i18n service.
Definition: Container.php:95
rbac()
Get interface to get interfaces to all things rbac.
Definition: Container.php:55
Class for global mail information (e.g.
This describes the specific behavior of an ILIAS standard icon.
Definition: Standard.php:27
if(!file_exists('../ilias.ini.php'))