19 declare(strict_types=1);
43 $access_helper = BasicAccessCheckClosuresSingleton::getInstance();
44 $top = StandardTopItemsProvider::getInstance()->getAdministrationIdentification();
46 if (!$access_helper->isUserLoggedIn()() || !$access_helper->hasAdministrationAccess()()) {
51 $this->dic->language()->loadLanguageModule(
'administration');
55 $this->dic->refinery()
60 foreach ($groups as $group => $group_items) {
62 if (is_array($group_items) && count($group_items) > 0) {
65 foreach ($group_items as $group_item) {
66 if ($group_item ===
"---") {
70 $icon = $this->dic->ui()->factory()->symbol()->icon()->standard($titems[$group_item][
"type"], $titems[$group_item][
"title"]);
72 $ref_id = $titems[$group_item][
"ref_id"];
74 $identification = $this->
if->identifier(
'mm_adm_rep');
75 $action =
"ilias.php?baseClass=ilAdministrationGUI&ref_id=" .
$ref_id .
"&admin_mode=repository";
77 $identification = $this->
if->identifier(
"mm_adm_" . $titems[$group_item][
"type"]);
78 $action =
"ilias.php?baseClass=ilAdministrationGUI&ref_id=" .
$ref_id .
"&cmd=jump";
83 ->link($identification)
84 ->withTitle($titems[$group_item][
"title"])
87 ->withVisibilityCallable(
function () use (
$ref_id) {
88 return $this->dic->rbac()->system()->checkAccess(
'visible,read', (
int)
$ref_id);
93 $title = $this->dic->language()->txt(
"adm_" . $group);
96 ->linkList($this->
if->identifier(
'adm_content_' . $group))
97 ->withSupportsAsynchronousLoading(
true)
102 ->withPosition($position * 10)
103 ->withAlwaysAvailable(
true)
104 ->withNonAvailableReason($this->dic->ui()->factory()->legacy(
"{$this->dic->language()->txt('item_must_be_always_active')}"))
106 $access_helper->hasAdministrationAccess()
108 $access_helper->isUserLoggedIn()
120 "maintenance" =>
"icon_sysa",
121 "layout_and_navigation" =>
"icon_laya",
122 "repository_and_objects" =>
"icon_repa",
123 "personal_workspace" =>
"icon_pwsa",
124 "achievements" =>
"icon_achva",
125 "communication" =>
"icon_coma",
126 "user_administration" =>
"icon_usra",
127 "search_and_find" =>
"icon_safa",
128 "extending_ilias" =>
"icon_exta",
129 'legal_regulations' =>
'icon_lega',
132 return $this->dic->ui()->factory()->symbol()->icon()->custom($icon_path, $title);
137 if (!$this->dic->offsetExists(
'tree')) {
140 $tree = $this->dic->repositoryTree();
141 $lng = $this->dic->language();
145 $this->dic->refinery()
151 foreach ($objects as $object) {
152 $new_objects[$object[
"title"] .
":" . $object[
"child"]]
155 if ($object[
"type"] ===
"orgu") {
156 $new_objects[$object[
"title"] .
":" . $object[
"child"]][
"title"] =
$lng->txt(
"objs_orgu");
169 "title" =>
$lng->txt(
"repository_admin"),
170 "description" =>
$lng->txt(
"repository_admin_desc"),
171 "desc" =>
$lng->txt(
"repository_admin_desc"),
181 "title" =>
$lng->txt(
"general_settings"),
187 foreach ($new_objects as
$c) {
189 if ($c[
"type"] !==
"adm" && $tree->getParentId((
int) $c[
"ref_id"]) ===
ROOT_FOLDER_ID 190 && $admin_request->getAdminMode() !==
"repository" 196 if ($c[
"type"] ==
"" || $c[
"type"] ===
"objf" 197 || $c[
"type"] ===
"xxx" 205 foreach ($items as $i) {
206 $titems[$i[
"type"]] = $i;
212 array(
"adm",
"lngf",
"hlps",
"wfe",
'fils',
'logs',
'sysc',
"recf",
"root"),
213 "layout_and_navigation" =>
214 array(
"mme",
"gsfo",
"dshs",
"stys",
"adve"),
215 "legal_regulations" =>
216 array(
"impr" ,
"tos",
"accs",
'dpro'),
217 "user_administration" =>
218 array(
"usrf",
"rolf",
"otpl",
"auth",
"ps"),
219 "personal_workspace" =>
220 array(
"tags",
"cals",
"prfa",
"prss",
"nots"),
222 array(
"lhts",
"skmg",
"trac",
"bdga",
"cert"),
224 array(
"mail",
"cadm",
"nwss",
"coms",
"adn",
"awra",
"nota"),
226 array(
"seas",
"mds",
"taxs"),
228 array(
'ecss',
"ltis",
"wbdv",
"cmis",
"cmps",
"extt"),
229 "repository_and_objects" =>
230 array(
"reps",
"crss",
"grps",
"prgs",
"bibs",
"blga",
"cpad",
"chta",
"facs",
"frma",
"lrss",
'lsos',
231 "mcts",
"mobs",
"svyf",
"assf",
"wbrs"),
235 foreach ($layout as $group => $entries) {
236 $groups[$group] = array();
237 $entries_since_last_sep =
false;
238 foreach ($entries as
$e) {
239 if ($e ===
"---" || (isset($titems[$e][
"type"]) && $titems[$e][
"type"] !=
"")) {
240 if ($e ===
"---" && $entries_since_last_sep) {
241 $groups[$group][] =
$e;
242 $entries_since_last_sep =
false;
245 $groups[$group][] =
$e;
246 $entries_since_last_sep =
true;
253 return [$groups, $titems];
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getIconForGroup(string $group, string $title)
if(!file_exists('../ilias.ini.php'))
withAvailableCallable(callable $is_available)
withVisibilityCallable(callable $is_visible)
Class AdministrationMainBarProvider.
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)