19 declare(strict_types=1);
62 if (!isset(self::$instance)) {
63 self::$instance =
new self(
$DIC);
66 return self::$instance;
76 $this->basic_access_helper = BasicAccessCheckClosuresSingleton::getInstance();
77 $this->repository_identification = $this->
if->identifier(
'repository');
78 $this->personal_workspace_identification = $this->
if->identifier(
'personal_workspace');
79 $this->achievements_identification = $this->
if->identifier(
'achievements');
80 $this->communication_identification = $this->
if->identifier(
'communication');
81 $this->organisation_identification = $this->
if->identifier(
'organisation');
82 $this->administration_identification = $this->
if->identifier(
'administration');
91 $f = (fn(
$id):
string => $this->dic->language()->txt(
$id));
94 $title = $this->dic->language()->txt(
"mm_dashboard");
95 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::DSHS, $title);
96 $dashboard = $this->mainmenu->topLinkItem($this->
if->identifier(
'mm_pd_crs_grp'))
99 ->withAction(
"ilias.php?baseClass=ilDashboardGUI&cmd=jumpToMemberships")
101 ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content(
"{$this->dic->language()->txt('component_not_active')}"))
106 $this->basic_access_helper->isUserLoggedIn()
109 $title =
$f(
"mm_repository");
110 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(Standard::REP, $title);
113 ->withVisibilityCallable($this->basic_access_helper->isRepositoryReadable())
118 $title =
$f(
"mm_personal_workspace");
119 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\
ilUtil::getImagePath(
"standard/icon_wksp.svg"), $title);
122 ->withVisibilityCallable($this->basic_access_helper->isUserLoggedIn())
127 $title =
$f(
"mm_achievements");
128 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\
ilUtil::getImagePath(
"standard/icon_achv.svg"), $title);
131 ->withVisibilityCallable($this->basic_access_helper->isUserLoggedIn())
136 $title =
$f(
"mm_communication");
137 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\
ilUtil::getImagePath(
"standard/icon_comu.svg"), $title);
140 ->withVisibilityCallable($this->basic_access_helper->isUserLoggedIn())
145 $title =
$f(
"mm_organisation");
146 $icon = $this->dic->ui()->factory()->symbol()->icon()->custom(\
ilUtil::getImagePath(
"standard/icon_orga.svg"), $title);
149 ->withVisibilityCallable($this->basic_access_helper->isUserLoggedIn())
154 $title =
$f(
"mm_administration");
155 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard(
"adm", $title);
158 ->withSupportsAsynchronousLoading(
false)
159 ->withAvailableCallable($this->basic_access_helper->isUserLoggedIn())
163 ->withVisibilityCallable($this->basic_access_helper->hasAdministrationAccess());
166 $ti =
new TypeInformation($administration::class, $administration::class);
167 $ti->setRenderer($dd_renderer);
168 $administration = $administration->setTypeInformation($ti);
IdentificationInterface $repository_identification
Interface IdentificationInterface.
getPersonalWorkspaceIdentification()
getAchievementsIdentification()
if(!file_exists('../ilias.ini.php'))
Class BasicAccessCheckClosures.
IdentificationInterface $personal_workspace_identification
IdentificationInterface $administration_identification
withAvailableCallable(callable $is_available)
Interface StaticMainMenuProvider.
Customizing of pimple-DIC for ILIAS.
__construct(Container $dic)
Render a TopItem as Drilldown (DD in Slate)
withVisibilityCallable(callable $is_visible)
getProviderNameForPresentation()
static StandardTopItemsProvider $instance
withSymbol(Symbol $symbol)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
getOrganisationIdentification()
getCommunicationIdentification()
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)
IdentificationInterface $achievements_identification
Class StandardTopItemsProvider.
getAdministrationIdentification()
getRepositoryIdentification()
IdentificationInterface $organisation_identification
IdentificationInterface $communication_identification
BasicAccessCheckClosures $basic_access_helper