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))
207 foreach($a_data as $area_caption => $fields)
209 if(is_numeric($area_caption) || !trim($area_caption))
211 $area_caption =
"obj_".$a_type;
214 if(is_array($fields) &&
sizeof($fields) == 2)
217 $fields = $fields[1];
218 if(is_array($fields))
220 $ftpl =
new ilTemplate(
"tpl.external_settings.html",
true,
true,
"Services/Administration");
224 foreach($fields as $field_caption_id => $field_value)
226 $field_type = $subitems = null;
227 if(is_array($field_value))
229 $field_type = $field_value[1];
230 $subitems = $field_value[2];
231 $field_value = $field_value[0];
234 if(self::parseFieldValue($field_type, $field_value))
236 $ftpl->setCurrentBlock(
"value_bl");
237 $ftpl->setVariable(
"VALUE", $field_value);
238 $ftpl->parseCurrentBlock();
241 if(is_array($subitems))
243 $ftpl->setCurrentBlock(
"subitem_bl");
244 foreach($subitems as $sub_caption_id => $sub_value)
247 if(is_array($sub_value))
249 $sub_type = $sub_value[1];
250 $sub_value = $sub_value[0];
252 self::parseFieldValue($sub_type, $sub_value);
254 $ftpl->setVariable(
"SUBKEY", $lng->txt($sub_caption_id));
255 $ftpl->setVariable(
"SUBVALUE", $sub_value);
256 $ftpl->parseCurrentBlock();
260 $ftpl->setCurrentBlock(
"row_bl");
261 $ftpl->setVariable(
"KEY", $lng->txt($field_caption_id));
262 $ftpl->parseCurrentBlock();
265 if ($rbacsystem->checkAccess(
"visible,read", $a_gui->object->getRefId()))
271 $ilCtrl->setParameter($a_gui,
"ref_id", $a_gui->object->getRefId());
273 $ftpl->setCurrentBlock(
"edit_bl");
274 $ftpl->setVariable(
"URL_EDIT", $ilCtrl->getLinkTargetByClass(array(
"ilAdministrationGUI", get_class($a_gui)),
$cmd));
275 $ftpl->setVariable(
"TXT_EDIT", $lng->txt(
"adm_external_setting_edit"));
276 $ftpl->parseCurrentBlock();
Class ilObjSystemFolderGUI.
Class ilObjectGUI Basic methods of all Output classes.
special template class to simplify handling of ITX/PEAR
static _lookupType($a_id, $a_reference=false)
lookup object type