ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
MailGlobalScreenToolProvider.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
29use ilMailGUI;
30
32{
33 final public const string SHOW_MAIL_FOLDERS_TOOL = 'show_mail_folders_tool';
34
36 {
37 return $this->context_collection->main()->repository()->administration();
38 }
39
40 public function getToolsForContextStack(
41 CalledContexts $called_contexts
42 ): array {
43 $identification = fn($id): IdentificationInterface => $this->identification_provider->contextAwareIdentifier($id);
44
45 $tools = [];
46
47 $additional_data = $called_contexts->getLast()->getAdditionalData();
48 if ($additional_data->exists(self::SHOW_MAIL_FOLDERS_TOOL) &&
49 $additional_data->get(self::SHOW_MAIL_FOLDERS_TOOL) === true) {
50 $title = $this->dic->language()->txt('mail_folders');
51 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard('mail', $title);
52
53 $tools[] = $this->factory
54 ->tool($identification('mail_folders_tree'))
55 ->withTitle($title)
56 ->withSymbol($icon)
57 ->withContentWrapper(function (): Content {
58 $exp = new ilMailExplorer(new ilMailGUI(), $this->dic->user()->getId());
59
60 return $this->dic->ui()->factory()->legacy()->content($exp->getHTML(true));
61 });
62 }
63
64 return $tools;
65 }
66}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
factory()
@ilCtrl_Calls ilMailGUI: ilMailFolderGUI, ilMailFormGUI, ilContactGUI, ilMailOptionsGUI,...