ILIAS  trunk Revision v11.0_alpha-2406-g7062992332c
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider Class Reference

Class OrgUnitMainBarProvider. More...

+ Inheritance diagram for ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider:
+ Collaboration diagram for ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider:

Public Member Functions

 __construct (Container $dic)
 
 getStaticTopItems ()
 
 getStaticSubItems ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
 __construct (Container $dic)
 
 getAllIdentifications ()
 
 provideTypeInformation ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (protected Container $dic)
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 

Private Attributes

IdentificationInterface $organisationIdentifier
 
IdentificationInterface $orgUnitIdentifier
 
IdentificationInterface $employeeTalkTemplateIdentifier
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 globalScreen ()
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
Container $dic
 
IdentificationProviderInterface $if
 
MainMenuItemFactory $mainmenu
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider::__construct ( Container  $dic)

Definition at line 40 of file OrgUnitMainBarProvider.php.

References ILIAS\GlobalScreen\Provider\__construct().

41  {
43  $this->organisationIdentifier = $this->if->identifier('mm_adm_org');
44  $this->orgUnitIdentifier = $this->if->identifier('mm_adm_org_orgu');
45  $this->employeeTalkTemplateIdentifier = $this->if->identifier('mm_adm_org_etal');
46  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ getStaticSubItems()

ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider::getStaticSubItems ( )
Returns
isItem[]

Implements ILIAS\GlobalScreen\Scope\MainMenu\Provider\StaticMainMenuProvider.

Definition at line 56 of file OrgUnitMainBarProvider.php.

References ilObjOrgUnit\getRootOrgRefId(), ilObjTalkTemplateAdministration\getRootRefId(), and ILIAS\GlobalScreen\Scope\Footer\Factory\withParent().

56  : array
57  {
58  $this->dic->language()->loadLanguageModule('mst');
59  $this->dic->language()->loadLanguageModule('etal');
60 
61  $items = [];
62  $access_helper = BasicAccessCheckClosuresSingleton::getInstance();
63  $top = StandardTopItemsProvider::getInstance()->getAdministrationIdentification();
64 
65  $title = $this->dic->language()->txt("objs_orgu");
66  $action = "ilias.php?baseClass=ilAdministrationGUI&ref_id=" . ilObjOrgUnit::getRootOrgRefId() . "&cmd=jump";
67  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard('orgu', $title);
68 
69  $linkOrgUnit = $this->mainmenu->link($this->orgUnitIdentifier)
70  ->withAlwaysAvailable(true)
71  ->withAction($action)
72  ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('item_must_be_always_active')}"))
73  ->withParent($this->organisationIdentifier)
74  ->withTitle($title)
75  ->withSymbol($icon)
76  ->withPosition(10)
77  ->withVisibilityCallable(
78  $access_helper->hasAdministrationAccess(function (): bool {
79  return $this->dic->access()->checkAccess(
80  'read',
81  '',
83  );
84  })
85  );
86 
87  $title = $this->dic->language()->txt("mm_talk_template", "");
88  $action = "ilias.php?baseClass=ilAdministrationGUI&ref_id=" . ilObjTalkTemplateAdministration::getRootRefId() . "&cmd=jump";
89  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard('tala', $title);
90  $linkEmployeeTalkTemplates = $this->mainmenu->link($this->employeeTalkTemplateIdentifier)
91  ->withAlwaysAvailable(true)
92  ->withAction($action)
93  ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('item_must_be_always_active')}"))
94  ->withParent($this->organisationIdentifier)
95  ->withTitle($title)
96  ->withSymbol($icon)
97  ->withPosition(20)
98  ->withVisibilityCallable(
99  $access_helper->hasAdministrationAccess(function (): bool {
100  return $this->dic->access()->checkAccess(
101  'read',
102  '',
104  );
105  })
106  );
107 
108  $title = $this->dic->language()->txt("mm_organisation");
109  $icon = $this->dic->ui()->factory()->symbol()->icon()->standard('org', $title);
110  $items[] = $this->mainmenu->linkList($this->organisationIdentifier)
111  ->withAlwaysAvailable(true)
112  ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content("{$this->dic->language()->txt('item_must_be_always_active')}"))
113  ->withParent($top)
114  ->withTitle($title)
115  ->withSymbol($icon)
116  ->withPosition(70)
117  ->withLinks([$linkOrgUnit, $linkEmployeeTalkTemplates])
118  ->withVisibilityCallable(
119  $access_helper->hasAdministrationAccess(function (): bool {
120  return $this->dic->access()->checkAccess(
121  'read',
122  '',
124  );
125  })
126  );
127 
128  return $items;
129  }
static getRootOrgRefId()
withParent(IdentificationInterface $identification)
+ Here is the call graph for this function:

◆ getStaticTopItems()

ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider::getStaticTopItems ( )
Returns
TopParentItem[] These are Slates which will be available for configuration.

Implements ILIAS\GlobalScreen\Scope\MainMenu\Provider\StaticMainMenuProvider.

Definition at line 48 of file OrgUnitMainBarProvider.php.

48  : array
49  {
50  return [];
51  }

Field Documentation

◆ $employeeTalkTemplateIdentifier

IdentificationInterface ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider::$employeeTalkTemplateIdentifier
private

Definition at line 38 of file OrgUnitMainBarProvider.php.

◆ $organisationIdentifier

IdentificationInterface ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider::$organisationIdentifier
private

Definition at line 36 of file OrgUnitMainBarProvider.php.

◆ $orgUnitIdentifier

IdentificationInterface ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider::$orgUnitIdentifier
private

Definition at line 37 of file OrgUnitMainBarProvider.php.


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