55 $tree = $DIC->repositoryTree();
57 $map = array(
"adm" => SYSTEM_FOLDER_ID);
58 foreach ($tree->getChilds(SYSTEM_FOLDER_ID) as $obj) {
59 $map[$obj[
"type"]] = $obj[
"ref_id"];
62 self::$OBJ_MAP = $map;
65 protected static function getRefId($a_obj_type)
67 if (!is_array(self::$OBJ_MAP)) {
68 self::initObjectMap();
70 return self::$OBJ_MAP[$a_obj_type];
77 $objDefinition = $DIC[
"objDefinition"];
80 $ref_id = self::getRefId($a_settings_obj_type);
83 $class_name = $objDefinition->getClassName($obj_type);
84 $class_name =
"ilObj" . $class_name .
"GUI";
85 $class_path =
$ilCtrl->lookupClassPath($class_name);
87 if (is_subclass_of($class_name,
"ilObject2GUI")) {
90 $gui_obj =
new $class_name(
"", $ref_id,
true,
false);
93 $gui_obj->setCreationMode(
true);
100 switch ($a_form_id) {
101 case self::FORM_SECURITY:
102 $types = array(self::SETTINGS_GENERAL, self::SETTINGS_USER, self::SETTINGS_FILE, self::SETTINGS_ROLE);
105 case self::FORM_PRIVACY:
106 $types = array(self::SETTINGS_ROLE, self::SETTINGS_FORUM, self::SETTINGS_LRES);
109 case self::FORM_FILES_QUOTA:
110 $types = array(self::SETTINGS_PR);
114 $types = array(self::SETTINGS_REPOSITORY);
117 case self::FORM_ACCESSIBILITY:
118 $types = array(self::SETTINGS_FORUM, self::SETTINGS_AUTH, self::SETTINGS_WIKI);
121 case self::FORM_MAIL:
122 $types = array(self::SETTINGS_COURSE, self::SETTINGS_GROUP, self::SETTINGS_LEARNINGSEQUENCE);
125 case self::FORM_COURSE:
126 case self::FORM_GROUP:
127 $types = array(self::SETTINGS_PRIVACY_SECURITY, self::SETTINGS_CALENDAR, self::SETTINGS_GENERAL);
131 $types = array(self::SETTINGS_PORTFOLIO);
134 case self::FORM_TAGGING:
135 $types = array(self::SETTINGS_REPOSITORY);
138 case self::FORM_CERTIFICATE:
139 $types = array(self::SETTINGS_LP_COMPLETION_STATUS);
147 if (is_array($types)) {
148 foreach ($types as
$type) {
149 $gui = self::getSettingsGUIInstance($type);
150 if ($gui && method_exists($gui,
"addToExternalSettingsForm")) {
151 $data = $gui->addToExternalSettingsForm($a_form_id);
152 if (is_array(
$data)) {
153 self::parseFieldDefinition($type, $a_form, $gui,
$data);
161 include_once
"Modules/SystemFolder/classes/class.ilObjSystemFolderGUI.php";
163 $parent_gui->setCreationMode(
true);
165 include_once
"Services/Cron/classes/class.ilCronManagerGUI.php";
167 $data = $gui->addToExternalSettingsForm($a_form_id);
169 self::parseFieldDefinition(
"cron", $a_form, $parent_gui,
$data);
177 $lng = $DIC->language();
179 switch ($a_field_type) {
180 case self::VALUE_BOOL:
181 $a_field_value = (bool) $a_field_value ?
182 $lng->txt(
"enabled") :
183 $lng->txt(
"disabled");
184 return $a_field_value;
187 if (!is_numeric($a_field_value) &&
188 $a_field_value !== null && !trim($a_field_value)) {
189 $a_field_value =
"-";
192 if (is_numeric($a_field_value) || $a_field_value !==
"") {
202 $lng = $DIC->language();
203 $rbacsystem = $DIC->rbac()->system();
205 $ilAccess = $DIC->access();
207 if (!is_array($a_data)) {
212 $has_write = $ilAccess->checkAccess(
"write",
"", (
int) $_REQUEST[
"ref_id"]);
214 foreach ($a_data as $area_caption => $fields) {
215 if (is_numeric($area_caption) || !trim($area_caption)) {
216 $area_caption =
"obj_" .
$a_type;
219 if (is_array($fields) &&
sizeof($fields) == 2) {
221 $fields = $fields[1];
222 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) {
228 $field_type = $subitems = null;
229 if (is_array($field_value)) {
230 $field_type = $field_value[1];
231 $subitems = $field_value[2];
232 $field_value = $field_value[0];
235 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)) {
242 $ftpl->setCurrentBlock(
"subitem_bl");
243 foreach ($subitems as $sub_caption_id => $sub_value) {
245 if (is_array($sub_value)) {
246 $sub_type = $sub_value[1];
247 $sub_value = $sub_value[0];
249 self::parseFieldValue($sub_type, $sub_value);
251 $ftpl->setVariable(
"SUBKEY",
$lng->txt($sub_caption_id));
252 $ftpl->setVariable(
"SUBVALUE", $sub_value);
253 $ftpl->parseCurrentBlock();
257 $ftpl->setCurrentBlock(
"row_bl");
258 $ftpl->setVariable(
"KEY",
$lng->txt($field_caption_id));
259 $ftpl->parseCurrentBlock();
263 $rbacsystem->checkAccess(
"visible,read", $a_gui->object->getRefId())) {
267 $ilCtrl->setParameter($a_gui,
"ref_id", $a_gui->object->getRefId());
269 $ftpl->setCurrentBlock(
"edit_bl");
270 $ftpl->setVariable(
"URL_EDIT",
$ilCtrl->getLinkTargetByClass(array(
"ilAdministrationGUI", get_class($a_gui)), $cmd));
271 $ftpl->setVariable(
"TXT_EDIT",
$lng->txt(
"adm_external_setting_edit"));
272 $ftpl->parseCurrentBlock();
Class ilObjSystemFolderGUI.
Class ilObjectGUI Basic methods of all Output classes.
static _lookupType($a_id, $a_reference=false)
lookup object type