50 $tree = $DIC->repositoryTree();
52 $map =
array(
"adm" => SYSTEM_FOLDER_ID);
53 foreach ($tree->getChilds(SYSTEM_FOLDER_ID) as $obj) {
54 $map[$obj[
"type"]] = $obj[
"ref_id"];
57 self::$OBJ_MAP = $map;
60 protected static function getRefId($a_obj_type)
62 if (!is_array(self::$OBJ_MAP)) {
63 self::initObjectMap();
65 return self::$OBJ_MAP[$a_obj_type];
72 $objDefinition = $DIC[
"objDefinition"];
75 $ref_id = self::getRefId($a_settings_obj_type);
78 $class_name = $objDefinition->getClassName($obj_type);
79 $class_name =
"ilObj" . $class_name .
"GUI";
81 $class_path =
$ilCtrl->lookupClassPath($class_name);
82 include_once($class_path);
84 if (is_subclass_of($class_name,
"ilObject2GUI")) {
87 $gui_obj =
new $class_name(
"", $ref_id,
true,
false);
90 $gui_obj->setCreationMode(
true);
98 case self::FORM_SECURITY:
99 $types =
array(self::SETTINGS_GENERAL, self::SETTINGS_USER, self::SETTINGS_FILE, self::SETTINGS_ROLE);
102 case self::FORM_PRIVACY:
103 $types =
array(self::SETTINGS_ROLE, self::SETTINGS_FORUM, self::SETTINGS_LRES);
106 case self::FORM_FILES_QUOTA:
107 $types =
array(self::SETTINGS_PD);
111 $types =
array(self::SETTINGS_REPOSITORY);
114 case self::FORM_ACCESSIBILITY:
115 $types =
array(self::SETTINGS_FORUM, self::SETTINGS_AUTH, self::SETTINGS_WIKI);
118 case self::FORM_MAIL:
119 $types =
array(self::SETTINGS_COURSE, self::SETTINGS_GROUP);
122 case self::FORM_COURSE:
123 case self::FORM_GROUP:
124 $types =
array(self::SETTINGS_PRIVACY_SECURITY, self::SETTINGS_CALENDAR, self::SETTINGS_GENERAL);
128 $types =
array(self::SETTINGS_PORTFOLIO);
131 case self::FORM_TAGGING:
132 $types =
array(self::SETTINGS_REPOSITORY);
140 if (is_array($types)) {
141 foreach ($types as
$type) {
142 $gui = self::getSettingsGUIInstance($type);
143 if ($gui && method_exists($gui,
"addToExternalSettingsForm")) {
144 $data = $gui->addToExternalSettingsForm($a_form_id);
145 if (is_array(
$data)) {
146 self::parseFieldDefinition($type, $a_form, $gui,
$data);
154 include_once
"Modules/SystemFolder/classes/class.ilObjSystemFolderGUI.php";
156 $parent_gui->setCreationMode(
true);
158 include_once
"Services/Cron/classes/class.ilCronManagerGUI.php";
160 $data = $gui->addToExternalSettingsForm($a_form_id);
162 self::parseFieldDefinition(
"cron", $a_form, $parent_gui,
$data);
170 $lng = $DIC->language();
172 switch ($a_field_type) {
173 case self::VALUE_BOOL:
174 $a_field_value = (bool) $a_field_value ?
175 $lng->txt(
"enabled") :
176 $lng->txt(
"disabled");
177 return $a_field_value;
180 if (!is_numeric($a_field_value) &&
181 $a_field_value !== null && !trim($a_field_value)) {
182 $a_field_value =
"-";
185 if (is_numeric($a_field_value) || $a_field_value !==
"") {
195 $lng = $DIC->language();
196 $rbacsystem = $DIC->rbac()->system();
198 $ilAccess = $DIC->access();
200 if (!is_array($a_data)) {
205 $has_write = $ilAccess->checkAccess(
"write",
"", (
int) $_REQUEST[
"ref_id"]);
207 foreach ($a_data as $area_caption => $fields) {
208 if (is_numeric($area_caption) || !trim($area_caption)) {
209 $area_caption =
"obj_" .
$a_type;
212 if (is_array($fields) &&
sizeof($fields) == 2) {
214 $fields = $fields[1];
215 if (is_array($fields)) {
216 $ftpl =
new ilTemplate(
"tpl.external_settings.html",
true,
true,
"Services/Administration");
220 foreach ($fields as $field_caption_id => $field_value) {
221 $field_type = $subitems = null;
222 if (is_array($field_value)) {
223 $field_type = $field_value[1];
224 $subitems = $field_value[2];
225 $field_value = $field_value[0];
228 if (self::parseFieldValue($field_type, $field_value)) {
229 $ftpl->setCurrentBlock(
"value_bl");
230 $ftpl->setVariable(
"VALUE", $field_value);
231 $ftpl->parseCurrentBlock();
234 if (is_array($subitems)) {
235 $ftpl->setCurrentBlock(
"subitem_bl");
236 foreach ($subitems as $sub_caption_id => $sub_value) {
238 if (is_array($sub_value)) {
239 $sub_type = $sub_value[1];
240 $sub_value = $sub_value[0];
242 self::parseFieldValue($sub_type, $sub_value);
244 $ftpl->setVariable(
"SUBKEY",
$lng->txt($sub_caption_id));
245 $ftpl->setVariable(
"SUBVALUE", $sub_value);
246 $ftpl->parseCurrentBlock();
250 $ftpl->setCurrentBlock(
"row_bl");
251 $ftpl->setVariable(
"KEY",
$lng->txt($field_caption_id));
252 $ftpl->parseCurrentBlock();
256 $rbacsystem->checkAccess(
"visible,read", $a_gui->object->getRefId())) {
260 $ilCtrl->setParameter($a_gui,
"ref_id", $a_gui->object->getRefId());
262 $ftpl->setCurrentBlock(
"edit_bl");
263 $ftpl->setVariable(
"URL_EDIT",
$ilCtrl->getLinkTargetByClass(
array(
"ilAdministrationGUI", get_class($a_gui)), $cmd));
264 $ftpl->setVariable(
"TXT_EDIT",
$lng->txt(
"adm_external_setting_edit"));
265 $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