ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 41 of file OrgUnitMainBarProvider.php.

References ILIAS\GlobalScreen\Provider\__construct().

42  {
44  $this->organisationIdentifier = $this->if->identifier('mm_adm_org');
45  $this->orgUnitIdentifier = $this->if->identifier('mm_adm_org_orgu');
46  $this->employeeTalkTemplateIdentifier = $this->if->identifier('mm_adm_org_etal');
47  }
__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 57 of file OrgUnitMainBarProvider.php.

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

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

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

Field Documentation

◆ $employeeTalkTemplateIdentifier

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

Definition at line 39 of file OrgUnitMainBarProvider.php.

◆ $organisationIdentifier

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

Definition at line 37 of file OrgUnitMainBarProvider.php.

◆ $orgUnitIdentifier

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

Definition at line 38 of file OrgUnitMainBarProvider.php.


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