19declare(strict_types=1);
44 $this->rbac_review =
$dic->
rbac()->review();
59 if (!$access_helper->isUserLoggedIn()() || !$access_helper->hasAdministrationAccess()()) {
64 $this->dic->language()->loadLanguageModule(
'administration');
68 $this->dic->refinery()
73 foreach ($groups as $group => $group_items) {
75 if (is_array($group_items) && count($group_items) > 0) {
78 foreach ($group_items as $group_item) {
79 if ($group_item ===
"---") {
83 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard($titems[$group_item][
"type"], $titems[$group_item][
"title"]);
85 $ref_id = $titems[$group_item][
"ref_id"];
87 $identification = $this->
if->identifier(
'mm_adm_rep');
88 $action =
"ilias.php?baseClass=ilAdministrationGUI&ref_id=" .
$ref_id .
"&admin_mode=repository";
90 $identification = $this->
if->identifier(
"mm_adm_" . $titems[$group_item][
"type"]);
91 $action =
"ilias.php?baseClass=ilAdministrationGUI&ref_id=" .
$ref_id .
"&cmd=jump";
96 ->link($identification)
97 ->withTitle($titems[$group_item][
"title"])
100 ->withVisibilityCallable(
function () use (
$ref_id) {
101 return $this->dic->rbac()->system()->checkAccess(
'read', (
int)
$ref_id);
106 $title = $this->dic->language()->txt(
"adm_" . $group);
109 ->linkList($this->
if->identifier(
'adm_content_' . $group))
110 ->withSupportsAsynchronousLoading(
true)
115 ->withPosition($position * 10)
116 ->withAlwaysAvailable(
true)
117 ->withNonAvailableReason($this->dic->ui()->factory()->legacy()->content(
"{$this->dic->language()->txt('item_must_be_always_active')}"))
118 ->withVisibilityCallable(
119 $access_helper->hasAdministrationAccess()
120 )->withAvailableCallable(
121 $access_helper->isUserLoggedIn()
133 "maintenance" =>
"icon_sysa",
134 "layout_and_navigation" =>
"icon_laya",
135 "repository_and_objects" =>
"icon_repa",
136 "personal_workspace" =>
"icon_pwsa",
137 "achievements" =>
"icon_achva",
138 "communication" =>
"icon_coma",
139 "user_administration" =>
"icon_usra",
140 "search_and_find" =>
"icon_safa",
141 "extending_ilias" =>
"icon_exta",
142 'legal_regulations' =>
'icon_lega',
145 return $this->dic->ui()->factory()->symbol()->icon()->custom($icon_path, $title);
150 if (!$this->dic->offsetExists(
'tree')) {
153 $tree = $this->dic->repositoryTree();
154 $lng = $this->dic->language();
158 $this->dic->refinery()
164 foreach ($objects as $object) {
165 $new_objects[$object[
"title"] .
":" . $object[
"child"]]
168 if ($object[
"type"] ===
"orgu") {
169 $new_objects[$object[
"title"] .
":" . $object[
"child"]][
"title"] =
$lng->txt(
"objs_orgu");
176 if ($this->rbac_review->isAssigned($this->user->getId(),
SYSTEM_ROLE_ID)) {
184 "title" =>
$lng->txt(
"repository_admin"),
185 "description" =>
$lng->txt(
"repository_admin_desc"),
186 "desc" =>
$lng->txt(
"repository_admin_desc"),
197 "title" =>
$lng->txt(
"general_settings"),
203 foreach ($new_objects as
$c) {
206 && $admin_request->getAdminMode() !==
"repository"
212 if (
$c[
"type"] ==
"" ||
$c[
"type"] ===
"objf"
213 ||
$c[
"type"] ===
"xxx"
221 foreach ($items as $i) {
222 $titems[$i[
"type"]] = $i;
228 array(
"adma",
"serv",
"cron",
"bnmk",
"lngf",
"hlps",
"wfe",
'fils',
'logs',
'sysc',
"recf",
"root"),
229 "layout_and_navigation" =>
230 array(
"mme",
"gsfo",
"dshs",
"stys",
"adve",
"stus"),
231 "repository_and_objects" =>
232 array(
"reps",
"crss",
"grps",
"prgs",
"bibs",
"blga",
"cpad",
"chta",
"facs",
"frma",
"lrss",
233 "mcts",
"mobs",
"svyf",
"assf",
"wbrs",
'lsos'),
234 "personal_workspace" =>
235 array(
"tags",
"cals",
"prfa",
"prss",
"nots"),
237 array(
"lhts",
"skmg",
"trac",
"bdga",
"cert"),
239 array(
"mail",
"cadm",
"nwss",
"coms",
"adn",
"awra",
"nota"),
240 "user_administration" =>
241 array(
"usrf",
"rolf",
"otpl",
"auth",
"ps"),
243 array(
"seas",
"mds",
"taxs"),
245 array(
'ecss',
"ltis",
"wbdv",
"cmis",
"maps",
"cmps"),
246 "legal_regulations" =>
247 array(
"impr" ,
"tos",
"accs",
'dpro')
251 foreach ($layout as $group => $entries) {
252 $groups[$group] = array();
253 $entries_since_last_sep =
false;
254 foreach ($entries as
$e) {
255 if (
$e ===
"---" || (isset($titems[
$e][
"type"]) && $titems[
$e][
"type"] !=
"")) {
256 if (
$e ===
"---" && $entries_since_last_sep) {
257 $groups[$group][] =
$e;
258 $entries_since_last_sep =
false;
261 $groups[$group][] =
$e;
262 $entries_since_last_sep =
true;
269 return [$groups, $titems];
Class AdministrationMainBarProvider.
getIconForGroup(string $group, string $title)
__construct(Container $dic)
@inheritDoc
ilRbacReview $rbac_review
Customizing of pimple-DIC for ILIAS.
user()
Get the current user.
rbac()
Get interface to get interfaces to all things rbac.
Class BasicAccessCheckClosuresSingleton.
Interface StaticMainMenuProvider.
Class StandardTopItemsProvider.
class ilRbacReview Contains Review functions of core Rbac.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
This describes how an icon could be modified during construction of UI.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
if(!file_exists('../ilias.ini.php'))