ILIAS  release_8 Revision v8.24
ILIAS\MainMenu\Provider\StandardTopItemsProvider Class Reference

Class StandardTopItemsProvider. More...

+ Inheritance diagram for ILIAS\MainMenu\Provider\StandardTopItemsProvider:
+ Collaboration diagram for ILIAS\MainMenu\Provider\StandardTopItemsProvider:

Public Member Functions

 __construct (Container $dic)
 @inheritDoc More...
 
 getStaticTopItems ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 @inheritDoc More...
 
 getStaticSubItems ()
 @inheritDoc More...
 
 getAdministrationIdentification ()
 
 getOrganisationIdentification ()
 
 getCommunicationIdentification ()
 
 getAchievementsIdentification ()
 
 getPersonalWorkspaceIdentification ()
 
 getRepositoryIdentification ()
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getAllIdentifications ()
 @inheritDoc More...
 
 provideTypeInformation ()
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
 __construct (Container $dic)
 @inheritDoc More...
 
 getFullyQualifiedClassName ()
 @inheritDoc More...
 
 getProviderNameForPresentation ()
 
 getFullyQualifiedClassName ()
 
 getProviderNameForPresentation ()
 
 getStaticTopItems ()
 
 getStaticSubItems ()
 
 provideTypeInformation ()
 
 getAllIdentifications ()
 

Static Public Member Functions

static getInstance ()
 

Private Attributes

BasicAccessCheckClosures $basic_access_helper
 
IdentificationInterface $administration_identification
 
IdentificationInterface $organisation_identification
 
IdentificationInterface $communication_identification
 
IdentificationInterface $achievements_identification
 
IdentificationInterface $personal_workspace_identification
 
IdentificationInterface $repository_identification
 

Static Private Attributes

static StandardTopItemsProvider $instance
 

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
 
- Protected Attributes inherited from ILIAS\GlobalScreen\Provider\AbstractProvider
Container $dic
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::__construct ( Container  $dic)

@inheritDoc

Reimplemented from ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider.

Definition at line 75 of file StandardTopItemsProvider.php.

76 {
78 $this->basic_access_helper = BasicAccessCheckClosuresSingleton::getInstance();
79 $this->repository_identification = $this->if->identifier('repository');
80 $this->personal_workspace_identification = $this->if->identifier('personal_workspace');
81 $this->achievements_identification = $this->if->identifier('achievements');
82 $this->communication_identification = $this->if->identifier('communication');
83 $this->organisation_identification = $this->if->identifier('organisation');
84 $this->administration_identification = $this->if->identifier('administration');
85 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Scope\MainMenu\Provider\AbstractStaticMainMenuProvider\$dic, ILIAS\GlobalScreen\Provider\__construct(), and ILIAS\GlobalScreen\Helper\BasicAccessCheckClosuresSingleton\getInstance().

+ Here is the call graph for this function:

Member Function Documentation

◆ getAchievementsIdentification()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::getAchievementsIdentification ( )

◆ getAdministrationIdentification()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::getAdministrationIdentification ( )
Returns
IdentificationInterface

Definition at line 210 of file StandardTopItemsProvider.php.

References ILIAS\MainMenu\Provider\StandardTopItemsProvider\$administration_identification.

Referenced by ILIAS\MainMenu\Provider\StandardTopItemsProvider\getStaticTopItems().

+ Here is the caller graph for this function:

◆ getCommunicationIdentification()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::getCommunicationIdentification ( )
Returns
IdentificationInterface

Definition at line 228 of file StandardTopItemsProvider.php.

References ILIAS\MainMenu\Provider\StandardTopItemsProvider\$communication_identification.

Referenced by ILIAS\MainMenu\Provider\StandardTopItemsProvider\getStaticTopItems().

+ Here is the caller graph for this function:

◆ getInstance()

static ILIAS\MainMenu\Provider\StandardTopItemsProvider::getInstance ( )
static
Returns
StandardTopItemsProvider

Definition at line 61 of file StandardTopItemsProvider.php.

62 {
63 global $DIC;
64 if (!isset(self::$instance)) {
65 self::$instance = new self($DIC);
66 }
67
68 return self::$instance;
69 }
global $DIC
Definition: feed.php:28

References $DIC, and ILIAS\MainMenu\Provider\StandardTopItemsProvider\$instance.

Referenced by ILIAS\EmployeeTalk\Provider\MyStaffListEntryProvider\__construct(), ILIAS\Chatroom\Provider\ChatMainBarProvider\getStaticSubItems(), ILIAS\OrgUnit\Provider\OrgUnitMainBarProvider\getStaticSubItems(), ILIAS\Portfolio\Provider\PortfolioMainBarProvider\getStaticSubItems(), ILIAS\Administration\AdministrationMainBarProvider\getStaticSubItems(), ILIAS\Badge\Provider\BadgeMainBarProvider\getStaticSubItems(), ILIAS\Calendar\Provider\CalendarMainBarProvider\getStaticSubItems(), ILIAS\Certificate\Provider\CertificateMainBarProvider\getStaticSubItems(), ILIAS\Contact\Provider\ContactMainBarProvider\getStaticSubItems(), ILIAS\LearningHistory\LearningHistoryMainBarProvider\getStaticSubItems(), ILIAS\Mail\Provider\MailMainBarProvider\getStaticSubItems(), ILIAS\Membership\GlobalScreen\MembershipMainBarProvider\getStaticSubItems(), ILIAS\MyStaff\Provider\StaffMainBarProvider\getStaticSubItems(), ILIAS\News\Provider\NewsMainBarProvider\getStaticSubItems(), ILIAS\Notes\Provider\NotesMainBarProvider\getStaticSubItems(), ILIAS\OnScreenChat\Provider\OnScreenChatProvider\getStaticSubItems(), ILIAS\PersonalWorkspace\Provider\WorkspaceMainBarProvider\getStaticSubItems(), ILIAS\Repository\Provider\RepositoryMainBarProvider\getStaticSubItems(), ILIAS\Skill\Provider\SkillMainBarProvider\getStaticSubItems(), ILIAS\Tagging\Provider\TaggingMainBarProvider\getStaticSubItems(), ILIAS\Tasks\DerivedTasks\Provider\DerivedTaskMainBarProvider\getStaticSubItems(), and ILIAS\LearningProgress\LPMainBarProvider\getStaticSubItems().

+ Here is the caller graph for this function:

◆ getOrganisationIdentification()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::getOrganisationIdentification ( )
Returns
IdentificationInterface

Definition at line 219 of file StandardTopItemsProvider.php.

References ILIAS\MainMenu\Provider\StandardTopItemsProvider\$organisation_identification.

Referenced by ILIAS\MainMenu\Provider\StandardTopItemsProvider\getStaticTopItems().

+ Here is the caller graph for this function:

◆ getPersonalWorkspaceIdentification()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::getPersonalWorkspaceIdentification ( )

◆ getProviderNameForPresentation()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::getProviderNameForPresentation ( )

@inheritDoc

Reimplemented from ILIAS\GlobalScreen\Provider\AbstractProvider.

Definition at line 192 of file StandardTopItemsProvider.php.

192 : string
193 {
194 return "Default";
195 }

◆ getRepositoryIdentification()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::getRepositoryIdentification ( )
Returns
IdentificationInterface

Definition at line 255 of file StandardTopItemsProvider.php.

References ILIAS\MainMenu\Provider\StandardTopItemsProvider\$repository_identification.

Referenced by ILIAS\MainMenu\Provider\StandardTopItemsProvider\getStaticTopItems().

+ Here is the caller graph for this function:

◆ getStaticSubItems()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::getStaticSubItems ( )

@inheritDoc

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

Definition at line 201 of file StandardTopItemsProvider.php.

201 : array
202 {
203 return [];
204 }

◆ getStaticTopItems()

ILIAS\MainMenu\Provider\StandardTopItemsProvider::getStaticTopItems ( )

@inheritDoc

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

Definition at line 91 of file StandardTopItemsProvider.php.

91 : array
92 {
93 $f = function ($id) {
94 return $this->dic->language()->txt($id);
95 };
96
97 // Dashboard
98 $title = $this->dic->language()->txt("mm_dashboard");
99 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::DSHS, $title);
100 $dashboard = $this->mainmenu->topLinkItem($this->if->identifier('mm_pd_crs_grp'))
101 ->withSymbol($icon)
102 ->withTitle($title)
103 ->withAction("ilias.php?baseClass=ilDashboardGUI&cmd=jumpToMemberships")
104 ->withPosition(10)
105 ->withNonAvailableReason($this->dic->ui()->factory()->legacy("{$this->dic->language()->txt('component_not_active')}"))
106 ->withAvailableCallable(
107 function () {
108 return true;
109 }
110 )
111 ->withVisibilityCallable(
112 $this->basic_access_helper->isUserLoggedIn()
113 );
114
115 $title = $f("mm_repository");
116 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::REP, $title);
117
118 $repository = $this->mainmenu->topParentItem($this->getRepositoryIdentification())
119 ->withVisibilityCallable($this->basic_access_helper->isRepositoryReadable())
120 ->withSymbol($icon)
121 ->withTitle($title)
122 ->withPosition(20);
123
124 $title = $f("mm_personal_workspace");
125 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("icon_wksp.svg"), $title);
126
127 $personal_workspace = $this->mainmenu->topParentItem($this->getPersonalWorkspaceIdentification())
128 ->withVisibilityCallable($this->basic_access_helper->isUserLoggedIn())
129 ->withSymbol($icon)
130 ->withTitle($title)
131 ->withPosition(30);
132
133 $title = $f("mm_achievements");
134 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("icon_achv.svg"), $title);
135
136 $achievements = $this->mainmenu->topParentItem($this->getAchievementsIdentification())
137 ->withVisibilityCallable($this->basic_access_helper->isUserLoggedIn())
138 ->withSymbol($icon)
139 ->withTitle($title)
140 ->withPosition(40);
141
142 $title = $f("mm_communication");
143 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("icon_comu.svg"), $title);
144
145 $communication = $this->mainmenu->topParentItem($this->getCommunicationIdentification())
146 ->withVisibilityCallable($this->basic_access_helper->isUserLoggedIn())
147 ->withSymbol($icon)
148 ->withTitle($title)
149 ->withPosition(50);
150
151 $title = $f("mm_organisation");
152 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\ilUtil::getImagePath("icon_orga.svg"), $title);
153
154 $organisation = $this->mainmenu->topParentItem($this->getOrganisationIdentification())
155 ->withVisibilityCallable($this->basic_access_helper->isUserLoggedIn())
156 ->withSymbol($icon)
157 ->withTitle($title)
158 ->withPosition(60);
159
160 $title = $f("mm_administration");
161 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard("adm", $title);
162
163 $administration = $this->mainmenu->topParentItem($this->getAdministrationIdentification())
164 ->withSupportsAsynchronousLoading(false)
165 ->withAvailableCallable($this->basic_access_helper->isUserLoggedIn())
166 ->withSymbol($icon)
167 ->withTitle($title)
168 ->withPosition(70)
169 ->withVisibilityCallable($this->basic_access_helper->hasAdministrationAccess());
170
171 $dd_renderer = new TopParentItemDrilldownRenderer();
172 $ti = new TypeInformation(get_class($administration), get_class($administration));
173 $ti->setRenderer($dd_renderer);
174 $administration = $administration->setTypeInformation($ti);
175
176
177 return [
178 $dashboard,
179 $repository,
180 $personal_workspace,
181 $achievements,
182 $communication,
183 $organisation,
184 $administration
185 ];
186 }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
withSymbol(Symbol $symbol)
@inheritDoc

References Vendor\Package\$f, $id, ILIAS\UI\Component\Symbol\Icon\Standard\DSHS, ILIAS\MainMenu\Provider\StandardTopItemsProvider\getAchievementsIdentification(), ILIAS\MainMenu\Provider\StandardTopItemsProvider\getAdministrationIdentification(), ILIAS\MainMenu\Provider\StandardTopItemsProvider\getCommunicationIdentification(), ilUtil\getImagePath(), ILIAS\MainMenu\Provider\StandardTopItemsProvider\getOrganisationIdentification(), ILIAS\MainMenu\Provider\StandardTopItemsProvider\getPersonalWorkspaceIdentification(), ILIAS\MainMenu\Provider\StandardTopItemsProvider\getRepositoryIdentification(), if, ILIAS\UI\Component\Symbol\Icon\Standard\REP, and ILIAS\GlobalScreen\Scope\MainMenu\Factory\withSymbol().

+ Here is the call graph for this function:

Field Documentation

◆ $achievements_identification

IdentificationInterface ILIAS\MainMenu\Provider\StandardTopItemsProvider::$achievements_identification
private

◆ $administration_identification

IdentificationInterface ILIAS\MainMenu\Provider\StandardTopItemsProvider::$administration_identification
private

◆ $basic_access_helper

BasicAccessCheckClosures ILIAS\MainMenu\Provider\StandardTopItemsProvider::$basic_access_helper
private

Definition at line 43 of file StandardTopItemsProvider.php.

◆ $communication_identification

IdentificationInterface ILIAS\MainMenu\Provider\StandardTopItemsProvider::$communication_identification
private

◆ $instance

StandardTopItemsProvider ILIAS\MainMenu\Provider\StandardTopItemsProvider::$instance
staticprivate

◆ $organisation_identification

IdentificationInterface ILIAS\MainMenu\Provider\StandardTopItemsProvider::$organisation_identification
private

◆ $personal_workspace_identification

IdentificationInterface ILIAS\MainMenu\Provider\StandardTopItemsProvider::$personal_workspace_identification
private

◆ $repository_identification

IdentificationInterface ILIAS\MainMenu\Provider\StandardTopItemsProvider::$repository_identification
private

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