ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
MailMainBarProvider.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Mail\Provider;
22 
27 
29 {
30  public function getStaticTopItems(): array
31  {
32  return [];
33  }
34 
35  public function getStaticSubItems(): array
36  {
37  $dic = $this->dic;
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  )
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
if(!file_exists('../ilias.ini.php'))
withVisibilityCallable(callable $is_visible)
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