ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ilPCSectionGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilPCSectionGUI:
+ Collaboration diagram for ilPCSectionGUI:

Public Member Functions

 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj=null, string $a_hier_id="", string $a_pc_id="")
 
 getHTML (array $params)
 
 checkInput (ilPropertyFormGUI $form)
 
 executeCommand ()
 
 insert (?ilPropertyFormGUI $a_form=null)
 
 edit (bool $a_insert=false, ?ilPropertyFormGUI $a_form=null)
 
 initForm (bool $a_insert=false)
 
 create ()
 
 update ()
 
 setValuesFromForm (ilPropertyFormGUI $form)
 
- Public Member Functions inherited from ilPageContentGUI
 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id="", string $a_pc_id="0")
 
 setContentObject (ilPageContent $a_val)
 
 getContentObject ()
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 getStyle ()
 
 getCharacteristicsOfCurrentStyle (array $a_type)
 Get characteristics of current style and call setCharacteristics, if style is given. More...
 
 setCharacteristics (array $a_chars)
 
 getCharacteristics ()
 
 getHierId ()
 
 setHierId (string $a_hier_id)
 set hierarchical id in dom object More...
 
 delete ()
 
 displayValidationError ()
 
 cancelCreate ()
 cancel creating page content More...
 
 cancelUpdate ()
 cancel update More...
 
 cancel ()
 Cancel. More...
 
 deactivate ()
 gui function set enabled if is not enabled and vice versa More...
 
 cut ()
 Cut single element. More...
 
 copy ()
 Copy single element. More...
 
 getTemplateOptions (string $a_type="")
 Get table templates. More...
 

Static Public Member Functions

static _getStandardCharacteristics ()
 
static _getCharacteristics (int $a_style_id)
 
- Static Public Member Functions inherited from ilPageContentGUI
static _getCommonBBButtons ()
 

Additional Inherited Members

- Data Fields inherited from ilPageContentGUI
ilPageContent $content_obj
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilPageObject $pg_obj
 
string $hier_id = ""
 
DOMDocument $dom
 
array bool null $updated = null
 
string $target_script = ""
 
string $return_location = ""
 
ilPageConfig $page_config = null
 
- Static Public Attributes inherited from ilPageContentGUI
static string $style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
 
- Protected Member Functions inherited from ilPageContentGUI
 redirectToParent (string $hier_id="")
 
 getParentReturn (string $hier_id="")
 
 updateAndReturn ()
 
 setCurrentTextLang (string $lang_key)
 
 getCurrentTextLang ()
 
 setEditorToolContext ()
 
 initEditor ()
 
 getEditorScriptTag (string $form_pc_id="", string $form_cname="")
 
- Protected Attributes inherited from ilPageContentGUI
ILIAS COPage Editor GUIService $editor_gui
 
ILIAS COPage InternalGUIService $gui
 
EditSessionRepository $edit_repo
 
string $pc_id = ""
 
array $chars
 
ilObjStyleSheet $style = null
 
LOMServices $lom_services
 
ilLogger $log
 
int $styleid = 0
 
EditGUIRequest $request
 
string $sub_command = ""
 
int $requested_ref_id = 0
 
ILIAS GlobalScreen ScreenContext ContextServices $tool_context
 
Style Content CharacteristicManager $char_manager
 
- Static Protected Attributes inherited from ilPageContentGUI
static array $common_bb_buttons
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning User Interface for Section Editing

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de @ilCtrl_Calls ilPCSectionGUI: ilPropertyFormGUI

Definition at line 24 of file class.ilPCSectionGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilPCSectionGUI::__construct ( ilPageObject  $a_pg_obj,
?ilPageContent  $a_content_obj = null,
string  $a_hier_id = "",
string  $a_pc_id = "" 
)

Reimplemented from ilPageContentGUI.

Definition at line 26 of file class.ilPCSectionGUI.php.

31 {
32 global $DIC;
33
34 $this->tpl = $DIC["tpl"];
35 $this->lng = $DIC->language();
36 $this->ctrl = $DIC->ctrl();
37 parent::__construct($a_pg_obj, $a_content_obj, $a_hier_id, $a_pc_id);
38
40 }
static _getStandardCharacteristics()
setCharacteristics(array $a_chars)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), _getStandardCharacteristics(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), and ilPageContentGUI\setCharacteristics().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getCharacteristics()

static ilPCSectionGUI::_getCharacteristics ( int  $a_style_id)
static

Definition at line 141 of file class.ilPCSectionGUI.php.

141 : array
142 {
143 global $DIC;
144
145 $service = $DIC->contentStyle()->internal();
146 $request = $DIC->copage()->internal()
147 ->gui()
148 ->pc()
149 ->editRequest();
150 $requested_ref_id = $request->getRefId();
151 $access_manager = $service->domain()->access(
153 $DIC->user()->getId()
154 );
155 $char_manager = $service->domain()->characteristic(
156 $a_style_id,
157 $access_manager
158 );
159
161 $chars = $std_chars;
162 if ($a_style_id > 0 &&
163 ilObject::_lookupType($a_style_id) == "sty") {
164 $style = new ilObjStyleSheet($a_style_id);
165 $chars = $style->getCharacteristics("section");
166 $new_chars = array();
167 foreach ($chars as $char) {
168 if ($char_manager->isOutdated("section", $char)) {
169 continue;
170 }
171 if (($std_chars[$char] ?? "") != "") { // keep lang vars for standard chars
172 $new_chars[$char] = $std_chars[$char];
173 } else {
174 $new_chars[$char] = $char;
175 }
176 }
177 $chars = $new_chars;
178 }
179 return $chars;
180 }
Class ilObjStyleSheet.
getCharacteristics(string $a_type="", bool $a_no_hidden=false, bool $a_include_core=true)
Get characteristics.
static _lookupType(int $id, bool $reference=false)
Style Content CharacteristicManager $char_manager
$service
Definition: ltiresult.php:44

References ilPageContentGUI\$char_manager, ilPageContentGUI\$chars, $DIC, ilPageContentGUI\$request, ilPageContentGUI\$requested_ref_id, $service, ilPageContentGUI\$style, _getStandardCharacteristics(), ilObject\_lookupType(), and ilObjStyleSheet\getCharacteristics().

+ Here is the call graph for this function:

◆ _getStandardCharacteristics()

static ilPCSectionGUI::_getStandardCharacteristics ( )
static

Definition at line 113 of file class.ilPCSectionGUI.php.

113 : array
114 {
115 global $DIC;
116
117 $lng = $DIC->language();
118
119 return array("Block" => $lng->txt("cont_Block"),
120 "Mnemonic" => $lng->txt("cont_Mnemonic"),
121 "Remark" => $lng->txt("cont_Remark"),
122 "Example" => $lng->txt("cont_Example"),
123 "Additional" => $lng->txt("cont_Additional"),
124 "Special" => $lng->txt("cont_Special"),
125
126 "Attention" => $lng->txt("cont_Attention"),
127 "Background" => $lng->txt("cont_Background"),
128 "Citation" => $lng->txt("cont_Citation"),
129 "Confirmation" => $lng->txt("cont_Confirmation"),
130 "Information" => $lng->txt("cont_Information"),
131 "Interaction" => $lng->txt("cont_Interaction"),
132 "Link" => $lng->txt("cont_char_link"),
133 "Literature" => $lng->txt("cont_Literature"),
134 "Separator" => $lng->txt("cont_Separator"),
135 "StandardCenter" => $lng->txt("cont_StandardCenter"),
136
137 "Excursus" => $lng->txt("cont_Excursus"),
138 "AdvancedKnowledge" => $lng->txt("cont_AdvancedKnowledge"));
139 }
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

References $DIC, ilPageContentGUI\$lng, and ilLanguage\txt().

Referenced by __construct(), and _getCharacteristics().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkInput()

ilPCSectionGUI::checkInput ( ilPropertyFormGUI  $form)

Definition at line 97 of file class.ilPCSectionGUI.php.

97 : bool
98 {
99 $ret = $form->checkInput();
100 if ($ret) {
101 $from = $form->getItemByPostVar("active_from")->getDate();
102 $to = $form->getItemByPostVar("active_to")->getDate();
103 if ($from && $to && $from->get(IL_CAL_UNIX) > $to->get(IL_CAL_UNIX)) {
104 $form->getItemByPostVar("active_to")->setAlert(
105 $this->lng->txt("copg_active_to_small")
106 );
107 $ret = false;
108 }
109 }
110 return $ret;
111 }
const IL_CAL_UNIX
getItemByPostVar(string $a_post_var)

References ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getItemByPostVar(), IL_CAL_UNIX, and ILIAS\Repository\lng().

Referenced by getHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

ilPCSectionGUI::create ( )

Definition at line 410 of file class.ilPCSectionGUI.php.

410 : void
411 {
412 $form = $this->initForm(true);
413 if ($form->checkInput()) {
414 $this->content_obj = new ilPCSection($this->getPage());
415 $this->content_obj->create($this->pg_obj, $this->hier_id, $this->pc_id);
416
417 $this->setValuesFromForm($form);
418
419 $this->updated = $this->pg_obj->update();
420 if ($this->updated === true) {
421 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
422 }
423 }
424
425 $this->insert($form);
426 }
setValuesFromForm(ilPropertyFormGUI $form)
initForm(bool $a_insert=false)
insert(?ilPropertyFormGUI $a_form=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ edit()

ilPCSectionGUI::edit ( bool  $a_insert = false,
?ilPropertyFormGUI  $a_form = null 
)

Definition at line 217 of file class.ilPCSectionGUI.php.

220 : void {
222
223 $this->displayValidationError();
224
225 if (!$a_form) {
226 $a_form = $this->initForm($a_insert);
227 }
228
229 $tpl->setContent($a_form->getHTML());
230 }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.

Referenced by insert().

+ Here is the caller graph for this function:

◆ executeCommand()

ilPCSectionGUI::executeCommand ( )
Returns
mixed
Exceptions
ilCtrlException

Definition at line 186 of file class.ilPCSectionGUI.php.

186 : mixed
187 {
188 $ret = "";
189
190 $this->getCharacteristicsOfCurrentStyle(["section"]); // scorm-2004
191
192 // get next class that processes or forwards current command
193 $next_class = $this->ctrl->getNextClass($this);
194
195 // get current command
196 $cmd = $this->ctrl->getCmd();
197
198 switch ($next_class) {
199 case "ilpropertyformgui":
200 $form = $this->initForm(true);
201 $this->ctrl->forwardCommand($form);
202 break;
203
204 default:
205 $ret = $this->$cmd();
206 break;
207 }
208
209 return $ret;
210 }
getCharacteristicsOfCurrentStyle(array $a_type)
Get characteristics of current style and call setCharacteristics, if style is given.

References ILIAS\Repository\ctrl(), ilPageContentGUI\getCharacteristicsOfCurrentStyle(), and initForm().

+ Here is the call graph for this function:

◆ getHTML()

ilPCSectionGUI::getHTML ( array  $params)

Definition at line 42 of file class.ilPCSectionGUI.php.

42 : string
43 {
44 $this->getCharacteristicsOfCurrentStyle(["section"]);
45
46 if ($params["form"] == true) {
47 $insert = !($this->content_obj);
48 $form = $this->initForm($params["insert"] ?? false);
49 $form->setShowTopButtons(false);
50
51 $onload_code = [];
52 $char = $form->getItemByPostVar("characteristic");
53 //$onload_code = array_merge($onload_code, $char->getOnloadCode());
54
55 $from = $form->getItemByPostVar("active_from");
56 $from->setSideBySide(false);
57 $onload_code = array_merge($onload_code, $from->getOnloadCode());
58
59 $to = $form->getItemByPostVar("active_to");
60 $to->setSideBySide(false);
61 $onload_code = array_merge($onload_code, $to->getOnloadCode());
62
63 $link = $form->getItemByPostVar("link");
64 $onload_code = array_merge($onload_code, $link->getOnloadCode());
65
66 $rep_sel = $form->getItemByPostVar("permission_ref_id");
67 $on_load_code3 = "";
68 $on_load_code4 = [];
69 if ($rep_sel) {
70 $exp = $rep_sel->getExplorerGUI();
71 $this->ctrl->setParameterByClass("ilformpropertydispatchgui", "postvar", "permission_ref_id");
72 $onload_code = array_merge($onload_code, [$exp->getOnloadCode()]);
73
74 $this->ctrl->setParameterByClass("ilformpropertydispatchgui", "postvar", "");
75 $onload_code = array_merge($onload_code, $rep_sel->getOnloadCode());
76 }
77
78 if (($params["validation"] ?? false) === true) {
79 $this->checkInput($form);
80 $form->setValuesByPost();
81 }
82
83 $html = $params["ui_wrapper"]->getRenderedForm(
84 $form,
85 $params["buttons"]
86 );
87
88 $html .= "<script>" .
89 implode("\n", $onload_code) .
90 "</script>";
91
92 return $html;
93 }
94 return "";
95 }
checkInput(ilPropertyFormGUI $form)

References ilPageContentGUI\$content_obj, checkInput(), ILIAS\Repository\ctrl(), ilPageContentGUI\getCharacteristicsOfCurrentStyle(), and initForm().

+ Here is the call graph for this function:

◆ initForm()

ilPCSectionGUI::initForm ( bool  $a_insert = false)

Definition at line 232 of file class.ilPCSectionGUI.php.

236 $ilCtrl = $this->ctrl;
237 $a_seleted_value = "";
238
239 // edit form
240 $form = new ilPropertyFormGUI();
241 $form->setFormAction($ilCtrl->getFormAction($this));
242 if ($a_insert) {
243 $form->setTitle($this->lng->txt("cont_insert_section"));
244 } else {
245 $form->setTitle($this->lng->txt("cont_update_section"));
246 }
247
248 // characteristic selection
249 $char_prop = new ilRadioGroupInputGUI(
250 $this->lng->txt("cont_characteristic"),
251 "characteristic"
252 );
253 /*$char_prop = new ilSelectInputGUI(
254 $this->lng->txt("cont_characteristic"),
255 "characteristic"
256 );*/
257 $chars = $this->getCharacteristics();
258 if (is_object($this->content_obj)) {
259 if (($chars[$a_seleted_value] ?? "") == "" && ($this->content_obj->getCharacteristic() != "")) {
260 $chars = array_merge(
261 array($this->content_obj->getCharacteristic() => $this->content_obj->getCharacteristic()),
262 $chars
263 );
264 }
265 }
266
267 $selected = ($a_insert)
268 ? "Block"
269 : $this->content_obj->getCharacteristic();
270
271 $options = [];
272 foreach ($chars as $k => $char) {
273 $options[$k] = $char;
274 $html = '<div class="il_COPgEditStyleSelectionItem"><div class="ilc_section_' . $k . '" style="' . self::$style_selector_reset . '">' .
275 $char . '</div></div>';
276 $ro = new ilRadioOption($html, $k);
277 $char_prop->addOption($ro);
278 }
279 //$char_prop->setOptions($options);
280
281 $char_prop->setValue($selected);
282 $form->addItem($char_prop);
283
284 // link input
285 //
286 $cb = new ilCheckboxInputGUI($lng->txt("cont_link"), "link_cb");
287
288 $ac = new ilLinkInputGUI($this->lng->txt('cont_target'), 'link');
289 $ac->setExternalLinkMaxLength(1000);
290 if ($this->getPageConfig()->getEnableInternalLinks()) {
291 $ac->setAllowedLinkTypes(ilLinkInputGUI::BOTH);
292 } else {
293 $ac->setAllowedLinkTypes(ilLinkInputGUI::EXT);
294 }
295 $ac->setRequired(true);
296 $ac->setInfo($this->lng->txt("copg_sec_link_info"));
297 $ac->setInternalLinkDefault(
298 $this->getPageConfig()->getIntLinkHelpDefaultType(),
299 $this->getPageConfig()->getIntLinkHelpDefaultId()
300 );
301 $link_types = $this->getPageConfig()->getIntLinkFilters();
302 if ($this->getPageConfig()->getIntLinkFilterWhiteList()) {
303 $link_types = array_diff($link_types, ["User"]);
304 } else {
305 $link_types[] = "User";
306 }
307 $ac->setInternalLinkFilterTypes($link_types);
308 $ac->setFilterWhiteList(
309 $this->getPageConfig()->getIntLinkFilterWhiteList()
310 );
311
312 if (!$a_insert) {
313 $l = $this->content_obj->getLink();
314 if ($l["LinkType"] == "IntLink") {
315 $target_frame = $l["TargetFrame"];
316 if (trim($target_frame) === "") {
317 $target_frame = trim($l["Anchor"]);
318 }
319 $ac->setValueByIntLinkAttributes($l["Type"], $l["Target"], $target_frame);
320 $cb->setChecked(true);
321 } elseif ($l["LinkType"] == "ExtLink") {
322 $ac->setValue($l["Href"]);
323 $cb->setChecked(true);
324 } else {
325 $ac->setValue("https://");
326 }
327 } else {
328 $ac->setValue("https://");
329 }
330 $form->addItem($cb);
331 $ac->setParentForm($form);
332 $cb->addSubItem($ac);
333
334
335 // activation
336
337 // active from
338 $act_cb = new ilCheckboxInputGUI($lng->txt("cont_activation"), "activation");
339 $form->addItem($act_cb);
340 $dt_prop = new ilDateTimeInputGUI($lng->txt("cont_active_from"), "active_from");
341 if (!$a_insert && ($from = $this->content_obj->getActiveFrom()) > 0) {
342 $dt_prop->setDate(new ilDateTime($from, IL_CAL_UNIX));
343 $act_cb->setChecked(true);
344 }
345 $dt_prop->setShowTime(true);
346 $act_cb->addSubItem($dt_prop);
347
348 // active to
349 $dt_prop = new ilDateTimeInputGUI($lng->txt("cont_active_to"), "active_to");
350 if (!$a_insert && ($to = $this->content_obj->getActiveTo()) > 0) {
351 $dt_prop->setDate(new ilDateTime($to, IL_CAL_UNIX));
352 $act_cb->setChecked(true);
353 }
354 $dt_prop->setShowTime(true);
355 $act_cb->addSubItem($dt_prop);
356
357 // rep selector
358 if ($this->getPageConfig()->getEnablePermissionChecks()) {
359 $perm_cb = new ilCheckboxInputGUI($lng->txt("cont_permission_handling"), "permission_handling");
360 $form->addItem($perm_cb);
361
362 $rs = new ilRepositorySelector2InputGUI($lng->txt("cont_permission_object"), "permission_ref_id", false, $form);
363 //$rs->setParent($this);
364 $rs->setParentForm($form);
365 $rs->setRequired(true);
366 $perm_cb->addSubItem($rs);
367
368 // permission
369 $options = array(
370 "read" => $lng->txt("read"),
371 "write" => $lng->txt("write"),
372 "visible" => $lng->txt("visible"),
373 "no_read" => $lng->txt("cont_no_read")
374 );
375 $si = new ilSelectInputGUI($lng->txt("permission"), "permission");
376 $si->setInfo($lng->txt("cont_permission_object_desc"));
377 $si->setOptions($options);
378 $perm_cb->addSubItem($si);
379
380 if (!$a_insert) {
381 $si->setValue($this->content_obj->getPermission());
382 $rs->setValue($this->content_obj->getPermissionRefId());
383 if ($this->content_obj->getPermissionRefId() > 0) {
384 $perm_cb->setChecked(true);
385 }
386 }
387 }
388
389 // protection
390 if ($this->getPageConfig()->getSectionProtection() == ilPageConfig::SEC_PROTECT_EDITABLE) {
391 $cb = new ilCheckboxInputGUI($lng->txt("cont_sec_protected"), "protected");
392 $cb->setInfo($this->getPageConfig()->getSectionProtectionInfo());
393 if (!$a_insert) {
394 $cb->setChecked($this->content_obj->getProtected());
395 }
396 $form->addItem($cb);
397 }
398
399 // save/cancel buttons
400 if ($a_insert) {
401 $form->addCommandButton("create", $lng->txt("save"));
402 $form->addCommandButton("cancelCreate", $lng->txt("cancel"));
403 } else {
404 $form->addCommandButton("update", $lng->txt("save"));
405 $form->addCommandButton("cancelUpdate", $lng->txt("cancel"));
406 }
407 return $form;
408 }
This class represents a checkbox property in a property form.
This class represents a date/time property in a property form.
@classDescription Date and time handling
This class represents a external and/or internal link in a property form.
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a selection list property in a property form.

Referenced by executeCommand(), and getHTML().

+ Here is the caller graph for this function:

◆ insert()

ilPCSectionGUI::insert ( ?ilPropertyFormGUI  $a_form = null)

Definition at line 212 of file class.ilPCSectionGUI.php.

212 : void
213 {
214 $this->edit(true, $a_form);
215 }
edit(bool $a_insert=false, ?ilPropertyFormGUI $a_form=null)

References edit().

+ Here is the call graph for this function:

◆ setValuesFromForm()

ilPCSectionGUI::setValuesFromForm ( ilPropertyFormGUI  $form)

Definition at line 444 of file class.ilPCSectionGUI.php.

444 : void
445 {
446 $this->content_obj->setCharacteristic($form->getInput("characteristic"));
447
448 $activation = (bool) $form->getInput("activation");
449 $from = $form->getItemByPostVar("active_from")->getDate();
450 if ($activation && $from) {
451 $this->content_obj->setActiveFrom($from->get(IL_CAL_UNIX));
452 } else {
453 $this->content_obj->setActiveFrom(0);
454 }
455
456 $to = $form->getItemByPostVar("active_to")->getDate();
457 if ($activation && $to) {
458 $this->content_obj->setActiveTo($to->get(IL_CAL_UNIX));
459 } else {
460 $this->content_obj->setActiveTo(0);
461 }
462
463 if ($this->getPageConfig()->getEnablePermissionChecks()) {
464 $permission_handling = (bool) $form->getInput("permission_handling");
465 if ($permission_handling) {
466 $this->content_obj->setPermissionRefId((int) $form->getInput("permission_ref_id"));
467 $this->content_obj->setPermission($form->getInput("permission"));
468 } else {
469 $this->content_obj->setPermissionRefId(0);
470 $this->content_obj->setPermission("");
471 }
472 }
473
474 if ($form->getInput("link_cb") !== "") {
475 if ($form->getInput("link_mode") == "ext" && $form->getInput("link") != "") {
476 $this->content_obj->setExtLink($form->getInput("link"));
477 } elseif ($form->getInput("link_mode") == "int" && $form->getInput("link") != "") {
478 $la = $form->getItemByPostVar("link")->getIntLinkAttributes();
479 if (($la["Type"] ?? "") != "") {
480 $anchor = "";
481 if (trim($la["TargetFrame"]) !== "" &&
482 !in_array($la["TargetFrame"], ["Media", "FAQ", "Glossary", "New"])) {
483 $anchor = trim($la["TargetFrame"]);
484 $la["TargetFrame"] = "";
485 }
486 $this->content_obj->setIntLink($la["Type"], $la["Target"], $la["TargetFrame"], $anchor);
487 }
488 } else {
489 $this->content_obj->setNoLink();
490 }
491 } else {
492 $this->content_obj->setNoLink();
493 }
494
495 if ($this->getPageConfig()->getSectionProtection() == ilPageConfig::SEC_PROTECT_EDITABLE) {
496 $this->content_obj->setProtected($form->getInput("protected"));
497 }
498 }
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...

References ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), IL_CAL_UNIX, and ilPageConfig\SEC_PROTECT_EDITABLE.

+ Here is the call graph for this function:

◆ update()

ilPCSectionGUI::update ( )

Definition at line 428 of file class.ilPCSectionGUI.php.

428 : void
429 {
430 $form = $this->initForm(false);
431 if ($form->checkInput()) {
432 $this->setValuesFromForm($form);
433
434 $this->updated = $this->pg_obj->update();
435 if ($this->updated === true) {
436 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
437 }
438 }
439
440 $this->pg_obj->addHierIDs();
441 $this->edit(false, $form);
442 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: