54 $tree = $DIC->repositoryTree();
56 $map = array(
"adm" => SYSTEM_FOLDER_ID);
57 foreach (
$tree->getChilds(SYSTEM_FOLDER_ID) as $obj) {
58 $map[$obj[
"type"]] = $obj[
"ref_id"];
61 self::$OBJ_MAP =
$map;
64 protected static function getRefId($a_obj_type)
66 if (!is_array(self::$OBJ_MAP)) {
67 self::initObjectMap();
69 return self::$OBJ_MAP[$a_obj_type];
76 $objDefinition = $DIC[
"objDefinition"];
79 $ref_id = self::getRefId($a_settings_obj_type);
82 $class_name = $objDefinition->getClassName($obj_type);
83 $class_name =
"ilObj" . $class_name .
"GUI";
85 $class_path =
$ilCtrl->lookupClassPath($class_name);
86 include_once($class_path);
88 if (is_subclass_of($class_name,
"ilObject2GUI")) {
91 $gui_obj =
new $class_name(
"", $ref_id,
true,
false);
94 $gui_obj->setCreationMode(
true);
101 switch ($a_form_id) {
102 case self::FORM_SECURITY:
103 $types = array(self::SETTINGS_GENERAL, self::SETTINGS_USER, self::SETTINGS_FILE, self::SETTINGS_ROLE);
106 case self::FORM_PRIVACY:
107 $types = array(self::SETTINGS_ROLE, self::SETTINGS_FORUM, self::SETTINGS_LRES);
110 case self::FORM_FILES_QUOTA:
111 $types = array(self::SETTINGS_PD);
115 $types = array(self::SETTINGS_REPOSITORY);
118 case self::FORM_ACCESSIBILITY:
119 $types = array(self::SETTINGS_FORUM, self::SETTINGS_AUTH, self::SETTINGS_WIKI);
122 case self::FORM_MAIL:
123 $types = array(self::SETTINGS_COURSE, self::SETTINGS_GROUP);
126 case self::FORM_COURSE:
127 case self::FORM_GROUP:
128 $types = array(self::SETTINGS_PRIVACY_SECURITY, self::SETTINGS_CALENDAR, self::SETTINGS_GENERAL);
132 $types = array(self::SETTINGS_PORTFOLIO);
135 case self::FORM_TAGGING:
136 $types = array(self::SETTINGS_REPOSITORY);
139 case self::FORM_CERTIFICATE:
140 $types = array(self::SETTINGS_LP_COMPLETION_STATUS);
148 if (is_array($types)) {
149 foreach ($types as
$type) {
150 $gui = self::getSettingsGUIInstance($type);
151 if ($gui && method_exists($gui,
"addToExternalSettingsForm")) {
152 $data = $gui->addToExternalSettingsForm($a_form_id);
153 if (is_array(
$data)) {
154 self::parseFieldDefinition($type, $a_form, $gui,
$data);
162 include_once
"Modules/SystemFolder/classes/class.ilObjSystemFolderGUI.php";
164 $parent_gui->setCreationMode(
true);
166 include_once
"Services/Cron/classes/class.ilCronManagerGUI.php";
168 $data = $gui->addToExternalSettingsForm($a_form_id);
170 self::parseFieldDefinition(
"cron", $a_form, $parent_gui,
$data);
178 $lng = $DIC->language();
180 switch ($a_field_type) {
181 case self::VALUE_BOOL:
182 $a_field_value = (bool) $a_field_value ?
183 $lng->txt(
"enabled") :
184 $lng->txt(
"disabled");
185 return $a_field_value;
188 if (!is_numeric($a_field_value) &&
189 $a_field_value !== null && !trim($a_field_value)) {
190 $a_field_value =
"-";
193 if (is_numeric($a_field_value) || $a_field_value !==
"") {
203 $lng = $DIC->language();
204 $rbacsystem = $DIC->rbac()->system();
206 $ilAccess = $DIC->access();
208 if (!is_array($a_data)) {
213 $has_write = $ilAccess->checkAccess(
"write",
"", (
int) $_REQUEST[
"ref_id"]);
215 foreach ($a_data as $area_caption => $fields) {
216 if (is_numeric($area_caption) || !trim($area_caption)) {
217 $area_caption =
"obj_" .
$a_type;
220 if (is_array($fields) &&
sizeof($fields) == 2) {
222 $fields = $fields[1];
223 if (is_array($fields)) {
224 $ftpl =
new ilTemplate(
"tpl.external_settings.html",
true,
true,
"Services/Administration");
228 foreach ($fields as $field_caption_id => $field_value) {
229 $field_type = $subitems = null;
230 if (is_array($field_value)) {
231 $field_type = $field_value[1];
232 $subitems = $field_value[2];
233 $field_value = $field_value[0];
236 if (self::parseFieldValue($field_type, $field_value)) {
237 $ftpl->setCurrentBlock(
"value_bl");
238 $ftpl->setVariable(
"VALUE", $field_value);
239 $ftpl->parseCurrentBlock();
242 if (is_array($subitems)) {
243 $ftpl->setCurrentBlock(
"subitem_bl");
244 foreach ($subitems as $sub_caption_id => $sub_value) {
246 if (is_array($sub_value)) {
247 $sub_type = $sub_value[1];
248 $sub_value = $sub_value[0];
250 self::parseFieldValue($sub_type, $sub_value);
252 $ftpl->setVariable(
"SUBKEY",
$lng->txt($sub_caption_id));
253 $ftpl->setVariable(
"SUBVALUE", $sub_value);
254 $ftpl->parseCurrentBlock();
258 $ftpl->setCurrentBlock(
"row_bl");
259 $ftpl->setVariable(
"KEY",
$lng->txt($field_caption_id));
260 $ftpl->parseCurrentBlock();
264 $rbacsystem->checkAccess(
"visible,read", $a_gui->object->getRefId())) {
268 $ilCtrl->setParameter($a_gui,
"ref_id", $a_gui->object->getRefId());
270 $ftpl->setCurrentBlock(
"edit_bl");
271 $ftpl->setVariable(
"URL_EDIT",
$ilCtrl->getLinkTargetByClass(array(
"ilAdministrationGUI", get_class($a_gui)), $cmd));
272 $ftpl->setVariable(
"TXT_EDIT",
$lng->txt(
"adm_external_setting_edit"));
273 $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