ILIAS  release_8 Revision v8.24
ilPageContentGUI Class Reference

User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...) More...

+ Inheritance diagram for ilPageContentGUI:
+ Collaboration diagram for ilPageContentGUI:

Public Member Functions

 __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 ()
 
 moveAfter ()
 move content element after another element More...
 
 moveBefore ()
 move content element before another element More...
 
 splitPage ()
 split page to new page at specified position More...
 
 splitPageNext ()
 split page to next page at specified position More...
 
 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 _getCommonBBButtons ()
 

Data Fields

ilPageContent $content_obj
 
ilGlobalTemplateInterface $tpl
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilPageObject $pg_obj
 
string $hier_id = ""
 
php4DOMDocument $dom
 
 $updated
 
string $target_script = ""
 
string $return_location = ""
 
ilPageConfig $page_config = null
 

Static Public Attributes

static string $style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
 

Protected Member Functions

 redirectToParent (string $hier_id="")
 
 getParentReturn (string $hier_id="")
 
 updateAndReturn ()
 
 setCurrentTextLang (string $lang_key)
 
 getCurrentTextLang ()
 

Protected Attributes

EditSessionRepository $edit_repo
 
string $pc_id = ""
 
array $chars
 
ilObjStyleSheet $style = null
 
ilLogger $log
 
int $styleid = 0
 
EditGUIRequest $request
 
string $sub_command = ""
 
int $requested_ref_id = 0
 
Style Content CharacteristicManager $char_manager
 

Static Protected Attributes

static array $common_bb_buttons
 

Detailed Description

User Interface for Editing of Page Content Objects (Paragraphs, Tables, ...)

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 29 of file class.ilPageContentGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented in ilPCAMDFormGUI, ilPCConsultationHoursGUI, ilPCMyCoursesGUI, ilPCAMDPageListGUI, ilPCBlogGUI, ilPCContentIncludeGUI, ilPCContentTemplateGUI, ilPCDataTableGUI, ilPCFileItemGUI, ilPCFileListGUI, ilPCGridCellGUI, ilPCGridGUI, ilPCInteractiveImageGUI, ilPCListGUI, ilPCListItemGUI, ilPCLoginPageElementGUI, ilPCMapGUI, ilPCMediaObjectGUI, ilPCParagraphGUI, ilPCPlaceHolderGUI, ilPCProfileGUI, ilPCQuestionGUI, ilPCQuestionOverviewGUI, ilPCResourcesGUI, ilPCSkillsGUI, ilPCSourceCodeGUI, ilPCTableDataGUI, ilPCTableGUI, ilPCTabsGUI, and ilPCSectionGUI.

Definition at line 65 of file class.ilPageContentGUI.php.

70 {
71 global $DIC;
72
73 $lng = $DIC->language();
74 $ilCtrl = $DIC->ctrl();
75
76 $this->log = ilLoggerFactory::getLogger('copg');
77
78 $this->tpl = $DIC->ui()->mainTemplate();
79 $this->lng = $lng;
80 $this->pg_obj = $a_pg_obj;
81 $this->ctrl = $ilCtrl;
82 $this->content_obj = $a_content_obj;
83 $service = $DIC->copage()->internal();
84 $this->request = $service
85 ->gui()
86 ->pc()
87 ->editRequest();
88 $this->edit_repo = $service
89 ->repo()
90 ->edit();
91 $this->sub_command = $this->request->getSubCmd();
92 $this->requested_ref_id = $this->request->getRefId();
93
94 if ($a_hier_id !== "0") {
95 $this->hier_id = $a_hier_id;
96 $this->pc_id = $a_pc_id;
97 //echo "-".$this->pc_id."-";
98 $this->dom = $a_pg_obj->getDom();
99 }
100 }
static getLogger(string $a_component_id)
Get component logger.
getDom()
@depracated
global $DIC
Definition: feed.php:28
$service
Definition: ltiservices.php:43

References $DIC, $lng, $service, ILIAS\Repository\ctrl(), ilPageObject\getDom(), ilLoggerFactory\getLogger(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getCommonBBButtons()

static ilPageContentGUI::_getCommonBBButtons ( )
static

Definition at line 132 of file class.ilPageContentGUI.php.

132 : array
133 {
135 }
static array $common_bb_buttons

References $common_bb_buttons.

Referenced by ilObjAdvancedEditingGUI\initPageEditorForm(), ilObjAdvancedEditingGUI\savePageEditorSettingsObject(), and ilPCParagraphGUI\xml2outputJS().

+ Here is the caller graph for this function:

◆ cancel()

ilPageContentGUI::cancel ( )

Cancel.

Reimplemented in ilPCParagraphGUI, and ilPCPlaceHolderGUI.

Definition at line 436 of file class.ilPageContentGUI.php.

436 : void
437 {
438 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
439 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ cancelCreate()

ilPageContentGUI::cancelCreate ( )

cancel creating page content

Reimplemented in ilPCSourceCodeGUI.

Definition at line 420 of file class.ilPageContentGUI.php.

420 : void
421 {
422 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
423 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ cancelUpdate()

ilPageContentGUI::cancelUpdate ( )

cancel update

Reimplemented in ilPCSourceCodeGUI.

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

428 : void
429 {
430 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
431 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ copy()

ilPageContentGUI::copy ( )

Copy single element.

Definition at line 476 of file class.ilPageContentGUI.php.

476 : void
477 {
478 $this->pg_obj->copyContents(array($this->hier_id . ":" . $this->pc_id));
479 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
480 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ cut()

ilPageContentGUI::cut ( )

Cut single element.

Definition at line 460 of file class.ilPageContentGUI.php.

460 : void
461 {
462 $updated = $this->pg_obj->cutContents(array($this->hier_id . ":" . $this->pc_id));
463 if ($updated !== true) {
464 $this->edit_repo->setPageError($updated);
465 } else {
466 $this->edit_repo->clearPageError();
467 }
468
469 $this->log->debug("return to parent jump" . $this->hier_id);
470 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
471 }

References $updated, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ deactivate()

ilPageContentGUI::deactivate ( )

gui function set enabled if is not enabled and vice versa

Definition at line 445 of file class.ilPageContentGUI.php.

445 : void
446 {
447 $obj = &$this->content_obj;
448
449 if ($obj->isEnabled()) {
450 $obj->disable();
451 } else {
452 $obj->enable();
453 }
454 $this->updateAndReturn();
455 }

References $content_obj, ilPageContent\disable(), and updateAndReturn().

+ Here is the call graph for this function:

◆ delete()

ilPageContentGUI::delete ( )

Definition at line 227 of file class.ilPageContentGUI.php.

227 : void
228 {
229 $updated = $this->pg_obj->deleteContent($this->hier_id);
230 if ($updated !== true) {
231 $this->edit_repo->setPageError($updated);
232 } else {
233 $this->edit_repo->clearPageError();
234 }
235 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
236 }

References $updated, and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ displayValidationError()

ilPageContentGUI::displayValidationError ( )

Definition at line 400 of file class.ilPageContentGUI.php.

400 : void
401 {
402 if (is_array($this->updated)) {
403 $error_str = "<b>Error(s):</b><br>";
404 foreach ($this->updated as $error) {
405 $err_mess = implode(" - ", $error);
406 if (!is_int(strpos($err_mess, ":0:"))) {
407 $error_str .= htmlentities($err_mess) . "<br />";
408 }
409 }
410 $this->tpl->setOnScreenMessage('failure', $error_str);
411 } elseif ($this->updated != "" && $this->updated !== true) {
412 $this->tpl->setOnScreenMessage('failure', "<b>Error(s):</b><br />" .
413 $this->updated);
414 }
415 }

Referenced by ilPCContentTemplateGUI\create(), ilPCMapGUI\create(), ilPCListGUI\edit(), ilPCMapGUI\edit(), ilPCSourceCodeGUI\edit(), ilPCVerificationGUI\edit(), ilPCLoginPageElementGUI\edit(), ilPCPluggedGUI\edit(), ilPCResourcesGUI\edit(), ilPCConsultationHoursGUI\edit(), ilPCMyCoursesGUI\edit(), ilPCAMDPageListGUI\edit(), ilPCBlogGUI\edit(), ilPCProfileGUI\edit(), ilPCSkillsGUI\edit(), ilPCLearningHistoryGUI\edit(), ilPCAMDFormGUI\editPortfolio(), ilPCAMDFormGUI\editTemplate(), ilPCContentTemplateGUI\insert(), ilPCGridGUI\insert(), ilPCListGUI\insert(), ilPCMapGUI\insert(), ilPCSourceCodeGUI\insert(), ilPCVerificationGUI\insert(), ilPCAMDFormGUI\insert(), ilPCConsultationHoursGUI\insert(), ilPCMyCoursesGUI\insert(), ilPCAMDPageListGUI\insert(), ilPCBlogGUI\insert(), ilPCFileListGUI\insert(), ilPCProfileGUI\insert(), ilPCSkillsGUI\insert(), ilPCLearningHistoryGUI\insert(), ilPCQuestionGUI\insert(), ilPCFileItemGUI\newItemAfter(), ilPCFileItemGUI\newItemBefore(), ilPCFileListGUI\selectFile(), and ilPCMapGUI\update().

+ Here is the caller graph for this function:

◆ getCharacteristics()

ilPageContentGUI::getCharacteristics ( )

Definition at line 208 of file class.ilPageContentGUI.php.

208 : array
209 {
210 return $this->chars ?? [];
211 }

◆ getCharacteristicsOfCurrentStyle()

ilPageContentGUI::getCharacteristicsOfCurrentStyle ( array  $a_type)

Get characteristics of current style and call setCharacteristics, if style is given.

Definition at line 161 of file class.ilPageContentGUI.php.

161 : void
162 {
163 global $DIC;
164 $service = $DIC->contentStyle()->internal();
165 $access_manager = $service->domain()->access(
166 $this->requested_ref_id,
167 $DIC->user()->getId()
168 );
169
170 if ($this->getStyleId() > 0 &&
171 ilObject::_lookupType($this->getStyleId()) == "sty") {
172 $char_manager = $service->domain()->characteristic(
173 $this->getStyleId(),
174 $access_manager
175 );
176
177 if (!is_array($a_type)) {
178 $a_type = array($a_type);
179 }
180 $chars = $char_manager->getByTypes($a_type, false, false);
181 $new_chars = array();
182 foreach ($chars as $char) {
183 if (($this->chars[$char->getCharacteristic()] ?? "") != "") { // keep lang vars for standard chars
184 $title = $char_manager->getPresentationTitle(
185 $char->getType(),
186 $char->getCharacteristic()
187 );
188 if ($title == "") {
189 $title = $this->chars[$char->getCharacteristic()];
190 }
191 $new_chars[$char->getCharacteristic()] = $title;
192 } else {
193 $new_chars[$char->getCharacteristic()] = $char_manager->getPresentationTitle(
194 $char->getType(),
195 $char->getCharacteristic()
196 );
197 }
198 }
199 $this->setCharacteristics($new_chars);
200 }
201 }
static _lookupType(int $id, bool $reference=false)
Style Content CharacteristicManager $char_manager
setCharacteristics(array $a_chars)

References $char_manager, $chars, $DIC, $service, ilObject\_lookupType(), getStyleId(), and setCharacteristics().

Referenced by ilPCDataTableGUI\executeCommand(), ilPCFileListGUI\executeCommand(), ilPCSectionGUI\executeCommand(), ilPCTableGUI\executeCommand(), and ilPCSectionGUI\getHTML().

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

◆ getContentObject()

ilPageContentGUI::getContentObject ( )

Definition at line 107 of file class.ilPageContentGUI.php.

108 {
109 return $this->content_obj;
110 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $content_obj.

◆ getCurrentTextLang()

ilPageContentGUI::getCurrentTextLang ( )
protected

Definition at line 537 of file class.ilPageContentGUI.php.

537 : string
538 {
539 return $this->edit_repo->getTextLang($this->requested_ref_id);
540 }

Referenced by ilPCSourceCodeGUI\insert().

+ Here is the caller graph for this function:

◆ getHierId()

ilPageContentGUI::getHierId ( )

Definition at line 213 of file class.ilPageContentGUI.php.

213 : string
214 {
215 return $this->hier_id;
216 }

References $hier_id.

◆ getPage()

◆ getPageConfig()

ilPageContentGUI::getPageConfig ( )

Definition at line 127 of file class.ilPageContentGUI.php.

128 {
129 return $this->page_config;
130 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $page_config.

Referenced by ilPCPlaceHolderGUI\edit(), ilPCSkillsGUI\edit(), ilPCQuestionGUI\feedback(), ilPCConsultationHoursGUI\initForm(), ilPCProfileGUI\initForm(), and ilPCSkillsGUI\insert().

+ Here is the caller graph for this function:

◆ getParentReturn()

ilPageContentGUI::getParentReturn ( string  $hier_id = "")
protected

Definition at line 511 of file class.ilPageContentGUI.php.

511 : string
512 {
513 if ($hier_id == "") {
515 }
516 $ilCtrl = $this->ctrl;
517 $pcid = $this->pg_obj->getPCIdForHierId($hier_id);
518 return $ilCtrl->getParentReturn($this) . "#add" . $pcid;
519 }
getParentReturn(object $a_gui_obj)
@inheritDoc

References $ctrl, $hier_id, and ilCtrl\getParentReturn().

+ Here is the call graph for this function:

◆ getStyle()

ilPageContentGUI::getStyle ( )

Definition at line 147 of file class.ilPageContentGUI.php.

148 {
149 if ((!is_object($this->style) || $this->getStyleId() != $this->style->getId()) && $this->getStyleId() > 0) {
150 if (ilObject::_lookupType($this->getStyleId()) == "sty") {
151 $this->style = new ilObjStyleSheet($this->getStyleId());
152 }
153 }
154 return $this->style;
155 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $style, ilObject\_lookupType(), and getStyleId().

Referenced by getTemplateOptions().

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

◆ getStyleId()

ilPageContentGUI::getStyleId ( )

Reimplemented in ilPCPlaceHolderGUI.

Definition at line 142 of file class.ilPageContentGUI.php.

142 : int
143 {
144 return $this->styleid;
145 }

References $styleid.

Referenced by getCharacteristicsOfCurrentStyle(), and getStyle().

+ Here is the caller graph for this function:

◆ getTemplateOptions()

ilPageContentGUI::getTemplateOptions ( string  $a_type = "")

Get table templates.

Reimplemented in ilPCTableGUI.

Definition at line 486 of file class.ilPageContentGUI.php.

486 : array
487 {
488 $style = $this->getStyle();
489
490 if (is_object($style)) {
491 $ts = $style->getTemplates($a_type);
492 $options = array();
493 foreach ($ts as $t) {
494 $options["t:" . $t["id"] . ":" . $t["name"]] = $t["name"];
495 }
496 return $options;
497 }
498 return array();
499 }
getTemplates(string $a_type)
Get table templates of style.

References $style, getStyle(), and ilObjStyleSheet\getTemplates().

+ Here is the call graph for this function:

◆ moveAfter()

ilPageContentGUI::moveAfter ( )

move content element after another element

Exceptions
ilCOPagePCEditException

Definition at line 242 of file class.ilPageContentGUI.php.

242 : void
243 {
244 $target = $this->request->getStringArray("target");
245 // check if a target is selected
246 if (count($target) == 0) {
247 throw new ilCOPagePCEditException(
248 $this->lng->txt("no_checkbox")
249 );
250 }
251
252 // check if only one target is selected
253 if (count($target) > 1) {
254 throw new ilCOPagePCEditException(
255 $this->lng->txt("only_one_target")
256 );
257 }
258
259 $a_hid = explode(":", $target[0]);
260 //echo "-".$a_hid[0]."-".$a_hid[1]."-";
261
262 // check if target is within source
263 if ($this->hier_id == substr($a_hid[0], 0, strlen($this->hier_id))) {
264 throw new ilCOPagePCEditException($this->lng->txt("cont_target_within_source"));
265 }
266
267 // check whether target is allowed
268 $curr_node = $this->pg_obj->getContentNode($a_hid[0], $a_hid[1]);
269 if (is_object($curr_node) && $curr_node->node_name() == "FileItem") {
270 throw new ilCOPagePCEditException($this->lng->txt("cont_operation_not_allowed"));
271 }
272
273 // strip "c" "r" of table ids from hierarchical id
274 $first_hier_character = substr($a_hid[0], 0, 1);
275 if ($first_hier_character == "c" ||
276 $first_hier_character == "r" ||
277 $first_hier_character == "i") {
278 $a_hid[0] = substr($a_hid[0], 1);
279 }
280
281 // move
282 $updated = $this->pg_obj->moveContentAfter(
283 $this->hier_id,
284 $a_hid[0],
285 $this->content_obj->getPCId(),
286 $a_hid[1]
287 );
288 if ($updated !== true) {
289 $this->edit_repo->setPageError($updated);
290 } else {
291 $this->edit_repo->clearPageError();
292 }
293 $this->log->debug("return to parent jump" . $this->hier_id);
294 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
295 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $updated, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ moveBefore()

ilPageContentGUI::moveBefore ( )

move content element before another element

Exceptions
ilCOPagePCEditException

Definition at line 301 of file class.ilPageContentGUI.php.

301 : void
302 {
303 $target = $this->request->getStringArray("target");
304 // check if a target is selected
305 if (count($target) == 0) {
306 throw new ilCOPagePCEditException($this->lng->txt("no_checkbox"));
307 }
308
309 // check if target is within source
310 if (count($target) > 1) {
311 throw new ilCOPagePCEditException($this->lng->txt("only_one_target"));
312 }
313
314 $a_hid = explode(":", $target[0]);
315
316 // check if target is within source
317 if ($this->hier_id == substr($a_hid[0], 0, strlen($this->hier_id))) {
318 throw new ilCOPagePCEditException($this->lng->txt("cont_target_within_source"));
319 }
320
321 // check whether target is allowed
322 $curr_node = $this->pg_obj->getContentNode($a_hid[0], $a_hid[1]);
323 if (is_object($curr_node) && $curr_node->node_name() == "FileItem") {
324 throw new ilCOPagePCEditException($this->lng->txt("cont_operation_not_allowed"));
325 }
326
327 // strip "c" "r" of table ids from hierarchical id
328 $first_hier_character = substr($a_hid[0], 0, 1);
329 if ($first_hier_character == "c" ||
330 $first_hier_character == "r" ||
331 $first_hier_character == "i") {
332 $a_hid[0] = substr($a_hid[0], 1);
333 }
334
335 // move
336 $updated = $this->pg_obj->moveContentBefore(
337 $this->hier_id,
338 $a_hid[0],
339 $this->content_obj->getPCId(),
340 $a_hid[1]
341 );
342 if ($updated !== true) {
343 $this->edit_repo->setPageError($updated);
344 } else {
345 $this->edit_repo->clearPageError();
346 }
347 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
348 }

References $updated, ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ redirectToParent()

ilPageContentGUI::redirectToParent ( string  $hier_id = "")
protected

Definition at line 501 of file class.ilPageContentGUI.php.

501 : void
502 {
503 $ilCtrl = $this->ctrl;
504 if ($hier_id == "") {
506 }
507 $pcid = $this->pg_obj->getPCIdForHierId($hier_id);
508 $ilCtrl->returnToParent($this, "add" . $pcid);
509 }

References $ctrl, and $hier_id.

Referenced by updateAndReturn().

+ Here is the caller graph for this function:

◆ setCharacteristics()

ilPageContentGUI::setCharacteristics ( array  $a_chars)

◆ setContentObject()

ilPageContentGUI::setContentObject ( ilPageContent  $a_val)

Definition at line 102 of file class.ilPageContentGUI.php.

102 : void
103 {
104 $this->content_obj = $a_val;
105 }

◆ setCurrentTextLang()

ilPageContentGUI::setCurrentTextLang ( string  $lang_key)
protected

Definition at line 532 of file class.ilPageContentGUI.php.

532 : void
533 {
534 $this->edit_repo->setTextLang($this->requested_ref_id, $lang_key);
535 }

Referenced by ilPCSourceCodeGUI\create().

+ Here is the caller graph for this function:

◆ setHierId()

ilPageContentGUI::setHierId ( string  $a_hier_id)

set hierarchical id in dom object

Definition at line 221 of file class.ilPageContentGUI.php.

221 : void
222 {
223 $this->hier_id = $a_hier_id;
224 }

Referenced by ilPCGridGUI\afterCreation().

+ Here is the caller graph for this function:

◆ setPage()

ilPageContentGUI::setPage ( ilPageObject  $a_val)

Definition at line 112 of file class.ilPageContentGUI.php.

112 : void
113 {
114 $this->pg_obj = $a_val;
115 }

◆ setPageConfig()

ilPageContentGUI::setPageConfig ( ilPageConfig  $a_val)

Definition at line 122 of file class.ilPageContentGUI.php.

122 : void
123 {
124 $this->page_config = $a_val;
125 }

◆ setStyleId()

ilPageContentGUI::setStyleId ( int  $a_styleid)

Reimplemented in ilPCPlaceHolderGUI.

Definition at line 137 of file class.ilPageContentGUI.php.

137 : void
138 {
139 $this->styleid = $a_styleid;
140 }

◆ splitPage()

ilPageContentGUI::splitPage ( )

split page to new page at specified position

Exceptions
ilCOPagePCEditException

Definition at line 355 of file class.ilPageContentGUI.php.

355 : void
356 {
357 if ($this->pg_obj->getParentType() != "lm") {
358 throw new ilCOPagePCEditException("Split method called for wrong parent type (" .
359 $this->pg_obj->getParentType() . ")");
360 } else {
362 $this->pg_obj->getId(),
363 $this->pg_obj->getParentType(),
364 $this->hier_id
365 );
366
367 // jump to new page
368 $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $lm_page->getId());
369 $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
370 }
371
372 $this->ctrl->returnToParent($this, "jump" . ($this->hier_id - 1));
373 }
static _splitPage(int $a_page_id, string $a_pg_parent_type, string $a_hier_id)
split page at hierarchical id the main reason for this method being static is that a lm page object i...

References ilLMPageObject\_splitPage(), and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ splitPageNext()

ilPageContentGUI::splitPageNext ( )

split page to next page at specified position

Exceptions
ilCOPagePCEditException

Definition at line 379 of file class.ilPageContentGUI.php.

379 : void
380 {
381 if ($this->pg_obj->getParentType() != "lm") {
382 throw new ilCOPagePCEditException("Split method called for wrong parent type (" .
383 $this->pg_obj->getParentType() . ")");
384 } else {
386 $this->pg_obj->getId(),
387 $this->pg_obj->getParentType(),
388 $this->hier_id
389 );
390
391 // jump to successor page
392 if ($succ_id > 0) {
393 $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $succ_id);
394 $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
395 }
396 }
397 $this->ctrl->returnToParent($this, "jump" . ($this->hier_id - 1));
398 }
static _splitPageNext(int $a_page_id, string $a_pg_parent_type, string $a_hier_id)
split page to next page at hierarchical id

References ilLMPageObject\_splitPageNext(), and ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ updateAndReturn()

ilPageContentGUI::updateAndReturn ( )
protected

Field Documentation

◆ $char_manager

Style Content CharacteristicManager ilPageContentGUI::$char_manager
protected

◆ $chars

array ilPageContentGUI::$chars
protected

◆ $common_bb_buttons

array ilPageContentGUI::$common_bb_buttons
staticprotected
Initial value:
= array(
"str" => "Strong", "emp" => "Emph", "imp" => "Important",
"sup" => "Sup", "sub" => "Sub",
"com" => "Comment",
"quot" => "Quotation", "acc" => "Accent", "code" => "Code", "tex" => "Tex",
"fn" => "Footnote", "xln" => "ExternalLink"
)

Definition at line 56 of file class.ilPageContentGUI.php.

Referenced by _getCommonBBButtons().

◆ $content_obj

ilPageContent ilPageContentGUI::$content_obj

◆ $ctrl

◆ $dom

php4DOMDocument ilPageContentGUI::$dom

Definition at line 41 of file class.ilPageContentGUI.php.

◆ $edit_repo

EditSessionRepository ilPageContentGUI::$edit_repo
protected

Definition at line 31 of file class.ilPageContentGUI.php.

◆ $hier_id

string ilPageContentGUI::$hier_id = ""

Definition at line 40 of file class.ilPageContentGUI.php.

Referenced by getHierId(), getParentReturn(), and redirectToParent().

◆ $lng

◆ $log

ilLogger ilPageContentGUI::$log
protected

Definition at line 47 of file class.ilPageContentGUI.php.

◆ $page_config

ilPageConfig ilPageContentGUI::$page_config = null

Definition at line 46 of file class.ilPageContentGUI.php.

Referenced by getPageConfig().

◆ $pc_id

string ilPageContentGUI::$pc_id = ""
protected

Definition at line 32 of file class.ilPageContentGUI.php.

Referenced by ilPCMediaObjectGUI\__construct().

◆ $pg_obj

ilPageObject ilPageContentGUI::$pg_obj

Definition at line 39 of file class.ilPageContentGUI.php.

Referenced by getPage().

◆ $request

◆ $requested_ref_id

int ilPageContentGUI::$requested_ref_id = 0
protected

◆ $return_location

string ilPageContentGUI::$return_location = ""

Definition at line 45 of file class.ilPageContentGUI.php.

◆ $style

ilObjStyleSheet ilPageContentGUI::$style = null
protected

◆ $style_selector_reset

string ilPageContentGUI::$style_selector_reset = "margin-top:2px; margin-bottom:2px; text-indent:0px; position:static; float:none; width: auto;"
static

Definition at line 53 of file class.ilPageContentGUI.php.

◆ $styleid

int ilPageContentGUI::$styleid = 0
protected

Definition at line 48 of file class.ilPageContentGUI.php.

Referenced by getStyleId(), and ilPCPlaceHolderGUI\getStyleId().

◆ $sub_command

◆ $target_script

string ilPageContentGUI::$target_script = ""

Definition at line 44 of file class.ilPageContentGUI.php.

◆ $tpl

◆ $updated

ilPageContentGUI::$updated

Definition at line 43 of file class.ilPageContentGUI.php.

Referenced by cut(), delete(), moveAfter(), and moveBefore().


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