50 $map =
array(
"adm" => SYSTEM_FOLDER_ID);
51 foreach($tree->getChilds(SYSTEM_FOLDER_ID) as $obj)
53 $map[$obj[
"type"]] = $obj[
"ref_id"];
56 self::$OBJ_MAP = $map;
59 protected static function getRefId($a_obj_type)
61 if(!is_array(self::$OBJ_MAP))
63 self::initObjectMap();
65 return self::$OBJ_MAP[$a_obj_type];
72 $ref_id = self::getRefId($a_settings_obj_type);
75 $class_name = $objDefinition->getClassName($obj_type);
76 $class_name =
"ilObj".$class_name.
"GUI";
78 $class_path = $ilCtrl->lookupClassPath($class_name);
79 include_once($class_path);
81 if(is_subclass_of($class_name,
"ilObject2GUI"))
87 $gui_obj =
new $class_name(
"",
$ref_id,
true,
false);
90 $gui_obj->setCreationMode(
true);
99 case self::FORM_SECURITY:
100 $types =
array(self::SETTINGS_GENERAL, self::SETTINGS_USER, self::SETTINGS_FILE, self::SETTINGS_ROLE);
103 case self::FORM_PRIVACY:
104 $types =
array(self::SETTINGS_ROLE, self::SETTINGS_FORUM, self::SETTINGS_LRES);
107 case self::FORM_FILES_QUOTA:
108 $types =
array(self::SETTINGS_PD);
112 $types =
array(self::SETTINGS_REPOSITORY);
115 case self::FORM_ACCESSIBILITY:
116 $types =
array(self::SETTINGS_FORUM, self::SETTINGS_AUTH, self::SETTINGS_WIKI);
119 case self::FORM_MAIL:
120 $types =
array(self::SETTINGS_COURSE, self::SETTINGS_GROUP);
123 case self::FORM_COURSE:
124 case self::FORM_GROUP:
125 $types =
array(self::SETTINGS_PRIVACY_SECURITY, self::SETTINGS_CALENDAR, self::SETTINGS_GENERAL);
129 $types =
array(self::SETTINGS_PORTFOLIO);
132 case self::FORM_TAGGING:
133 $types =
array(self::SETTINGS_REPOSITORY);
143 foreach($types as $type)
145 $gui = self::getSettingsGUIInstance($type);
146 if($gui && method_exists($gui,
"addToExternalSettingsForm"))
148 $data = $gui->addToExternalSettingsForm($a_form_id);
151 self::parseFieldDefinition($type, $a_form, $gui,
$data);
159 include_once
"Modules/SystemFolder/classes/class.ilObjSystemFolderGUI.php";
161 $parent_gui->setCreationMode(
true);
163 include_once
"Services/Cron/classes/class.ilCronManagerGUI.php";
165 $data = $gui->addToExternalSettingsForm($a_form_id);
168 self::parseFieldDefinition(
"cron", $a_form, $parent_gui,
$data);
176 switch($a_field_type)
178 case self::VALUE_BOOL:
179 $a_field_value = (bool)$a_field_value ?
180 $lng->txt(
"enabled") :
181 $lng->txt(
"disabled");
182 return $a_field_value;
185 if(!is_numeric($a_field_value) &&
186 $a_field_value !== null && !trim($a_field_value))
188 $a_field_value =
"-";
191 if(is_numeric($a_field_value) || $a_field_value !==
"")
202 if(!is_array($a_data))
208 $has_write = $ilAccess->checkAccess(
"write",
"", (
int)$_REQUEST[
"ref_id"]);
210 foreach($a_data as $area_caption => $fields)
212 if(is_numeric($area_caption) || !trim($area_caption))
214 $area_caption =
"obj_".$a_type;
217 if(is_array($fields) &&
sizeof($fields) == 2)
220 $fields = $fields[1];
221 if(is_array($fields))
223 $ftpl =
new ilTemplate(
"tpl.external_settings.html",
true,
true,
"Services/Administration");
227 foreach($fields as $field_caption_id => $field_value)
229 $field_type = $subitems = null;
230 if(is_array($field_value))
232 $field_type = $field_value[1];
233 $subitems = $field_value[2];
234 $field_value = $field_value[0];
237 if(self::parseFieldValue($field_type, $field_value))
239 $ftpl->setCurrentBlock(
"value_bl");
240 $ftpl->setVariable(
"VALUE", $field_value);
241 $ftpl->parseCurrentBlock();
244 if(is_array($subitems))
246 $ftpl->setCurrentBlock(
"subitem_bl");
247 foreach($subitems as $sub_caption_id => $sub_value)
250 if(is_array($sub_value))
252 $sub_type = $sub_value[1];
253 $sub_value = $sub_value[0];
255 self::parseFieldValue($sub_type, $sub_value);
257 $ftpl->setVariable(
"SUBKEY", $lng->txt($sub_caption_id));
258 $ftpl->setVariable(
"SUBVALUE", $sub_value);
259 $ftpl->parseCurrentBlock();
263 $ftpl->setCurrentBlock(
"row_bl");
264 $ftpl->setVariable(
"KEY", $lng->txt($field_caption_id));
265 $ftpl->parseCurrentBlock();
269 $rbacsystem->checkAccess(
"visible,read", $a_gui->object->getRefId()))
275 $ilCtrl->setParameter($a_gui,
"ref_id", $a_gui->object->getRefId());
277 $ftpl->setCurrentBlock(
"edit_bl");
278 $ftpl->setVariable(
"URL_EDIT", $ilCtrl->getLinkTargetByClass(
array(
"ilAdministrationGUI", get_class($a_gui)),
$cmd));
279 $ftpl->setVariable(
"TXT_EDIT", $lng->txt(
"adm_external_setting_edit"));
280 $ftpl->parseCurrentBlock();
Class ilObjSystemFolderGUI.
Class ilObjectGUI Basic methods of all Output classes.
special template class to simplify handling of ITX/PEAR
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type