ILIAS  release_8 Revision v8.24
ILIAS\Mail\Provider\MailGlobalScreenToolProvider Class Reference

Class MailGlobalScreenToolProvider. More...

+ Inheritance diagram for ILIAS\Mail\Provider\MailGlobalScreenToolProvider:
+ Collaboration diagram for ILIAS\Mail\Provider\MailGlobalScreenToolProvider:

Public Member Functions

 isInterestedInContexts ()
 
 getToolsForContextStack (CalledContexts $called_contexts)
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
 __construct (Container $dic)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getToolsForContextStack (CalledContexts $called_contexts)
 
 isInterestedInContexts ()
 

Data Fields

const SHOW_MAIL_FOLDERS_TOOL = 'show_mail_folders_tool'
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\Tool\Provider\AbstractDynamicToolProvider
ToolIdentificationProviderInterface $identification_provider
 
ContextCollection $context_collection
 
ToolFactory $factory
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
Container $dic
 

Detailed Description

Member Function Documentation

◆ getToolsForContextStack()

ILIAS\Mail\Provider\MailGlobalScreenToolProvider::getToolsForContextStack ( CalledContexts  $called_contexts)
Parameters
CalledContexts$called_contexts
Returns
Tool[] These Slates can be passed to the MainMenu dynamic for a specific location/context.
See also
DynamicProvider

Implements ILIAS\GlobalScreen\Scope\Tool\Provider\DynamicToolProvider.

Definition at line 44 of file MailGlobalScreenToolProvider.php.

46 : array {
47 $identification = function ($id): IdentificationInterface {
48 return $this->identification_provider->contextAwareIdentifier($id);
49 };
50
51 $tools = [];
52
53 $additional_data = $called_contexts->getLast()->getAdditionalData();
54 if ($additional_data->exists(self::SHOW_MAIL_FOLDERS_TOOL) &&
55 $additional_data->get(self::SHOW_MAIL_FOLDERS_TOOL) === true) {
56 $title = $this->dic->language()->txt('mail_folders');
57 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard('mail', $title);
58
59 $tools[] = $this->factory
60 ->tool($identification('mail_folders_tree'))
61 ->withTitle($title)
62 ->withSymbol($icon)
63 ->withContentWrapper(function (): Legacy {
64 $exp = new ilMailExplorer(new ilMailGUI(), $this->dic->user()->getId());
65
66 return $this->dic->ui()->factory()->legacy($exp->getHTML(true));
67 });
68 }
69
70 return $tools;
71 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23

◆ isInterestedInContexts()

ILIAS\Mail\Provider\MailGlobalScreenToolProvider::isInterestedInContexts ( )
Returns
ContextCollection

Implements ILIAS\GlobalScreen\ScreenContext\ScreenContextAwareProvider.

Definition at line 39 of file MailGlobalScreenToolProvider.php.

39 : ContextCollection
40 {
41 return $this->context_collection->main()->repository()->administration();
42 }

References ILIAS\GlobalScreen\ScreenContext\Stack\ContextCollection\main().

+ Here is the call graph for this function:

Field Documentation

◆ SHOW_MAIL_FOLDERS_TOOL

const ILIAS\Mail\Provider\MailGlobalScreenToolProvider::SHOW_MAIL_FOLDERS_TOOL = 'show_mail_folders_tool'

Definition at line 37 of file MailGlobalScreenToolProvider.php.


The documentation for this class was generated from the following file: