ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ($a_pg_obj, $a_content_obj, $a_hier_id=0, $a_pc_id="")
 Constructor @access public. More...
 
 setContentObject ($a_val)
 Set content object. More...
 
 getContentObject ()
 Get content object. More...
 
 setPage ($a_val)
 Set page. More...
 
 getPage ()
 Get page. More...
 
 setPageConfig ($a_val)
 Set Page Config. More...
 
 getPageConfig ()
 Get Page Config. More...
 
 setStyleId ($a_styleid)
 Set Style Id. More...
 
 getStyleId ()
 Get Style Id. More...
 
 getStyle ()
 Get style object. More...
 
 setCharacteristics ($a_chars)
 Set Characteristics. More...
 
 getCharacteristics ()
 Get characteristics. More...
 
 getHierId ()
 get hierarchical id in dom object More...
 
 setHierId ($a_hier_id)
 get hierarchical id in dom object More...
 
 getBBMenu ($a_ta_name="par_content")
 Get the bb menu incl. More...
 
 delete ()
 delete content element More...
 
 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 ()
 display validation errors More...
 
 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 ($a_type)
 Get table templates. More...
 

Static Public Member Functions

static _getCommonBBButtons ()
 Get common bb buttons. More...
 

Data Fields

 $content_obj
 
 $tpl
 
 $lng
 
 $ctrl
 
 $pg_obj
 
 $hier_id
 
 $dom
 
 $updated
 
 $target_script
 
 $return_location
 
 $page_config = null
 

Static Public Attributes

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

Protected Member Functions

 getCharacteristicsOfCurrentStyle ($a_type)
 Get characteristics of current style. More...
 

Protected Attributes

 $error
 
 $log
 

Static Protected Attributes

static $common_bb_buttons
 

Detailed Description

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

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

ilPageContentGUI::__construct (   $a_pg_obj,
  $a_content_obj,
  $a_hier_id = 0,
  $a_pc_id = "" 
)

Constructor @access public.

Reimplemented in ilPCConsultationHoursGUI, ilPCMyCoursesGUI, ilPCAMDPageListGUI, ilPCBlogGUI, ilPCContentTemplateGUI, ilPCGridGUI, ilPCLoginPageElementGUI, ilPCPlaceHolderGUI, ilPCSourceCodeGUI, ilPCInteractiveImageGUI, and ilPCMediaObjectGUI.

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

58 {
59 global $DIC;
60
61 $this->error = $DIC["ilErr"];
62 $tpl = $DIC["tpl"];
63 $lng = $DIC->language();
64 $ilCtrl = $DIC->ctrl();
65
66 $this->log = ilLoggerFactory::getLogger('copg');
67
68 $this->tpl = $tpl;
69 $this->lng = $lng;
70 $this->pg_obj = $a_pg_obj;
71 $this->ctrl = $ilCtrl;
72 $this->content_obj = $a_content_obj;
73
74 if ($a_hier_id !== 0) {
75 $this->hier_id = $a_hier_id;
76 $this->pc_id = $a_pc_id;
77 //echo "-".$this->pc_id."-";
78 $this->dom = $a_pg_obj->getDom();
79 }
80 }
error($a_errmsg)
set error message @access public
static getLogger($a_component_id)
Get component logger.
global $ilCtrl
Definition: ilias.php:18
global $DIC
Definition: saml.php:7

References $DIC, $ilCtrl, $lng, $tpl, error(), and ilLoggerFactory\getLogger().

+ Here is the call graph for this function:

Member Function Documentation

◆ _getCommonBBButtons()

static ilPageContentGUI::_getCommonBBButtons ( )
static

◆ cancel()

ilPageContentGUI::cancel ( )

Cancel.

Reimplemented in ilPCParagraphGUI, and ilPCPlaceHolderGUI.

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

557 {
558 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
559 }

◆ cancelCreate()

ilPageContentGUI::cancelCreate ( )

cancel creating page content

Reimplemented in ilPCSourceCodeGUI.

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

541 {
542 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
543 }

◆ cancelUpdate()

ilPageContentGUI::cancelUpdate ( )

cancel update

Reimplemented in ilPCSourceCodeGUI.

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

549 {
550 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
551 }

◆ copy()

ilPageContentGUI::copy ( )

Copy single element.

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

610 {
612
613 $obj = $this->content_obj;
614
615 //ilUtil::sendSuccess($lng->txt("cont_sel_el_copied_use_paste"), true);
616 $this->pg_obj->copyContents(array($this->hier_id . ":" . $this->pc_id));
617
618 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
619 }

References $content_obj, and $lng.

◆ cut()

ilPageContentGUI::cut ( )

Cut single element.

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

589 {
591
592 $obj = $this->content_obj;
593
594 $updated = $this->pg_obj->cutContents(array($this->hier_id . ":" . $this->pc_id));
595 if ($updated !== true) {
596 $_SESSION["il_pg_error"] = $updated;
597 } else {
598 unset($_SESSION["il_pg_error"]);
599 }
600
601 //ilUtil::sendSuccess($lng->txt("cont_sel_el_cut_use_paste"), true);
602 $this->log->debug("return to parent jump" . $this->hier_id);
603 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
604 }
$_SESSION["AccountId"]

References $_SESSION, $content_obj, $lng, and $updated.

◆ deactivate()

ilPageContentGUI::deactivate ( )

gui function set enabled if is not enabled and vice versa

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

566 {
567 $obj = &$this->content_obj;
568
569 if ($obj->isEnabled()) {
570 $obj->disable();
571 } else {
572 $obj->enable();
573 }
574
575 $updated = $this->pg_obj->update($this->hier_id);
576 if ($updated !== true) {
577 $_SESSION["il_pg_error"] = $updated;
578 } else {
579 unset($_SESSION["il_pg_error"]);
580 }
581
582 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
583 }

References $_SESSION, $content_obj, and $updated.

◆ delete()

ilPageContentGUI::delete ( )

delete content element

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

347 {
348 $updated = $this->pg_obj->deleteContent($this->hier_id);
349 if ($updated !== true) {
350 $_SESSION["il_pg_error"] = $updated;
351 } else {
352 unset($_SESSION["il_pg_error"]);
353 }
354 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
355 }

References $_SESSION, and $updated.

◆ displayValidationError()

ilPageContentGUI::displayValidationError ( )

display validation errors

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

521 {
522 if (is_array($this->updated)) {
523 $error_str = "<b>Error(s):</b><br>";
524 foreach ($this->updated as $error) {
525 $err_mess = implode($error, " - ");
526 if (!is_int(strpos($err_mess, ":0:"))) {
527 $error_str .= htmlentities($err_mess) . "<br />";
528 }
529 }
530 ilUtil::sendFailure($error_str);
531 } elseif ($this->updated != "" && $this->updated !== true) {
532 ilUtil::sendFailure("<b>Error(s):</b><br />" .
533 $this->updated);
534 }
535 }
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.

References $error, and ilUtil\sendFailure().

Referenced by ilPCMediaObjectGUI\changeObjectReference(), ilPCContentTemplateGUI\create(), ilPCMapGUI\create(), ilPCLoginPageElementGUI\edit(), ilPCMapGUI\edit(), ilPCParagraphGUI\edit(), ilPCPluggedGUI\edit(), ilPCQuestionOverviewGUI\edit(), ilPCResourcesGUI\edit(), ilPCSectionGUI\edit(), ilPCListGUI\edit(), ilPCSourceCodeGUI\edit(), ilPCTableGUI\edit(), ilPCConsultationHoursGUI\edit(), ilPCMyCoursesGUI\edit(), ilPCAMDPageListGUI\edit(), ilPCBlogGUI\edit(), ilPCProfileGUI\edit(), ilPCSkillsGUI\edit(), ilPCVerificationGUI\edit(), ilPCLearningHistoryGUI\edit(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCDataTableGUI\editData(), ilPCDataTableGUI\editDataCl(), ilPCBlogGUI\editPosting(), ilPCGridGUI\editProperties(), ilPCTabsGUI\editProperties(), ilPCMediaObjectGUI\editStyle(), ilPCFileListGUI\insert(), ilPCQuestionGUI\insert(), ilPCTabsGUI\insert(), ilPCInteractiveImageGUI\insert(), ilPCMediaObjectGUI\insert(), ilPCContentTemplateGUI\insert(), ilPCGridGUI\insert(), ilPCListGUI\insert(), ilPCMapGUI\insert(), ilPCSourceCodeGUI\insert(), ilPCTableGUI\insert(), ilPCConsultationHoursGUI\insert(), ilPCMyCoursesGUI\insert(), ilPCAMDPageListGUI\insert(), ilPCBlogGUI\insert(), ilPCProfileGUI\insert(), ilPCSkillsGUI\insert(), ilPCVerificationGUI\insert(), ilPCLearningHistoryGUI\insert(), ilPCBlogGUI\insertPosting(), ilPCFileListGUI\newFileItem(), ilPCFileItemGUI\newItemAfter(), ilPCFileItemGUI\newItemBefore(), ilPCFileListGUI\selectFile(), and ilPCMapGUI\update().

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

◆ getBBMenu()

ilPageContentGUI::getBBMenu (   $a_ta_name = "par_content")

Get the bb menu incl.

script

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

255 {
258
259 include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
260
261 $btpl = new ilTemplate("tpl.bb_menu.html", true, true, "Services/COPage");
262
263 // not nice, should be set by context per method
264 if ($this->getPageConfig()->getEnableInternalLinks()) {
265 $btpl->setCurrentBlock("bb_ilink_button");
266 $btpl->setVariable(
267 "BB_LINK_ILINK",
268 $this->ctrl->getLinkTargetByClass("ilInternalLinkGUI", "showLinkHelp")
269 );
270 $btpl->parseCurrentBlock();
271
272 // add int link parts
273 include_once("./Services/Link/classes/class.ilInternalLinkGUI.php");
274 $btpl->setCurrentBlock("int_link_prep");
275 $btpl->setVariable("INT_LINK_PREP", ilInternalLinkGUI::getInitHTML(
276 $ilCtrl->getLinkTargetByClass(
277 array("ilpageeditorgui", "ilinternallinkgui"),
278 "",
279 false,
280 true,
281 false
282 ),
283 true
284 ));
285 $btpl->parseCurrentBlock();
286 }
287
288 if ($this->getPageConfig()->getEnableKeywords()) {
289 $btpl->touchBlock("bb_kw_button");
290 $btpl->setVariable("TXT_KW", $this->lng->txt("cont_text_keyword"));
291 }
292 if ($this->pg_obj->getParentType() == "wpg") {
293 $btpl->setCurrentBlock("bb_wikilink_button2");
294 $btpl->setVariable("TXT_WIKI_BUTTON2", $lng->txt("obj_wiki"));
295 $btpl->setVariable("WIKI_BUTTON2_URL", $ilCtrl->getLinkTargetByClass("ilwikipagegui", ""));
296 $btpl->parseCurrentBlock();
297
298 $btpl->setCurrentBlock("bb_wikilink_button");
299 $btpl->setVariable("TXT_WLN2", $lng->txt("wiki_wiki_page"));
300 $btpl->parseCurrentBlock();
301 }
302 $mathJaxSetting = new ilSetting("MathJax");
303 $style = $this->getStyle();
304 //echo URL_TO_LATEX;
305 foreach (self::$common_bb_buttons as $c => $st) {
306 if (ilPageEditorSettings::lookupSettingByParentType($this->pg_obj->getParentType(), "active_" . $c, true)) {
307 if ($c != "tex" || $mathJaxSetting->get("enable") || defined("URL_TO_LATEX")) {
308 if (!in_array($c, array("acc", "com", "quot", "code"))) {
309 $btpl->touchBlock("bb_" . $c . "_button");
310 $btpl->setVariable("TXT_" . strtoupper($c), $this->lng->txt("cont_text_" . $c));
311 $lng->toJS("cont_text_" . $c);
312 }
313 }
314 }
315 }
316
317 if ($this->getPageConfig()->getEnableAnchors()) {
318 $btpl->touchBlock("bb_anc_button");
319 $btpl->setVariable("TXT_ANC", $lng->txt("cont_anchor") . ":");
320 $lng->toJS("cont_anchor");
321 }
322
323 include_once("./Services/COPage/classes/class.ilPCParagraphGUI.php");
324 $btpl->setVariable("CHAR_STYLE_SELECT", ilPCParagraphGUI::getCharStyleSelector($this->pg_obj->getParentType(), "il.COPageBB.setCharacterClass", $this->getStyleId()));
325
326 // footnote
327 // $btpl->setVariable("TXT_FN", $this->lng->txt("cont_text_fn"));
328
329 // $btpl->setVariable("TXT_CODE", $this->lng->txt("cont_text_code"));
330 $btpl->setVariable("TXT_ILN", $this->lng->txt("cont_text_iln"));
331 $lng->toJS("cont_text_iln");
332 // $btpl->setVariable("TXT_XLN", $this->lng->txt("cont_text_xln"));
333 // $btpl->setVariable("TXT_TEX", $this->lng->txt("cont_text_tex"));
334 $btpl->setVariable("TXT_BB_TIP", $this->lng->txt("cont_bb_tip"));
335 $btpl->setVariable("TXT_WLN", $lng->txt("wiki_wiki_page"));
336 $lng->toJS("wiki_wiki_page");
337
338 $btpl->setVariable("PAR_TA_NAME", $a_ta_name);
339
340 return $btpl->get();
341 }
if(strpos( $jquery_path, './')===0) elseif(strpos($jquery_path, '.')===0) $mathJaxSetting
Definition: latex.php:32
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
static getCharStyleSelector($a_par_type, $a_use_callback=true, $a_style_id=0)
Get character style selector.
getPageConfig()
Get Page Config.
getStyle()
Get style object.
static lookupSettingByParentType($a_par_type, $a_name, $a_default=false)
Lookup setting by parent type.
ILIAS Setting Class.
special template class to simplify handling of ITX/PEAR
$style
Definition: example_012.php:70

References $c, $ctrl, $ilCtrl, $lng, $mathJaxSetting, $style, ilPCParagraphGUI\getCharStyleSelector(), ilInternalLinkGUI\getInitHTML(), getPageConfig(), getStyle(), and ilPageEditorSettings\lookupSettingByParentType().

Referenced by ilPCParagraphGUI\edit(), and ilPCDataTableGUI\editDataCl().

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

◆ getCharacteristics()

ilPageContentGUI::getCharacteristics ( )

◆ getCharacteristicsOfCurrentStyle()

ilPageContentGUI::getCharacteristicsOfCurrentStyle (   $a_type)
protected

Get characteristics of current style.

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

190 {
191 if ($this->getStyleId() > 0 &&
192 ilObject::_lookupType($this->getStyleId()) == "sty") {
193 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
194 $style = new ilObjStyleSheet($this->getStyleId());
195 $chars = array();
196 if (!is_array($a_type)) {
197 $a_type = array($a_type);
198 }
199 foreach ($a_type as $at) {
200 $chars = array_merge($chars, $style->getCharacteristics($at, true));
201 }
202 $new_chars = array();
203 if (is_array($chars)) {
204 foreach ($chars as $char) {
205 if ($this->chars[$char] != "") { // keep lang vars for standard chars
206 $new_chars[$char] = $this->chars[$char];
207 } else {
208 $new_chars[$char] = $char;
209 }
210 asort($new_chars);
211 }
212 }
213 $this->setCharacteristics($new_chars);
214 }
215 }
Class ilObjStyleSheet.
static _lookupType($a_id, $a_reference=false)
lookup object type
setCharacteristics($a_chars)
Set Characteristics.
$a_type
Definition: workflow.php:92

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

Referenced by ilPCTableGUI\editCellStyle(), ilPCDataTableGUI\executeCommand(), ilPCFileListGUI\executeCommand(), ilPCMediaObjectGUI\executeCommand(), ilPCParagraphGUI\executeCommand(), ilPCSectionGUI\executeCommand(), ilPCTableGUI\executeCommand(), ilPCListGUI\initListForm(), and ilPCTableGUI\initPropertiesForm().

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

◆ getContentObject()

ilPageContentGUI::getContentObject ( )

Get content object.

Returns
object content object

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

98 {
99 return $this->content_obj;
100 }

References $content_obj.

◆ getHierId()

◆ getPage()

◆ getPageConfig()

◆ getStyle()

ilPageContentGUI::getStyle ( )

Get style object.

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

175 {
176 if ((!is_object($this->style) || $this->getStyleId() != $this->style->getId()) && $this->getStyleId() > 0) {
177 if (ilObject::_lookupType($this->getStyleId()) == "sty") {
178 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
179 $this->style = new ilObjStyleSheet($this->getStyleId());
180 }
181 }
182
183 return $this->style;
184 }

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

Referenced by getBBMenu(), and getTemplateOptions().

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

◆ getStyleId()

ilPageContentGUI::getStyleId ( )

Get Style Id.

Returns
int Style Id

Reimplemented in ilPCPlaceHolderGUI.

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

167 {
168 return $this->styleid;
169 }

Referenced by ilPCDataTableGUI\editData(), getCharacteristicsOfCurrentStyle(), ilPCTabsGUI\getFormValues(), ilPCTableGUI\getPropertiesFormValues(), getStyle(), and ilPCTableGUI\renderTable().

+ Here is the caller graph for this function:

◆ getTemplateOptions()

ilPageContentGUI::getTemplateOptions (   $a_type)

Get table templates.

Reimplemented in ilPCTableGUI.

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

626 {
627 $style = $this->getStyle();
628
629 if (is_object($style)) {
630 $ts = $style->getTemplates($a_type);
631 $options = array();
632 foreach ($ts as $t) {
633 $options["t:" . $t["id"] . ":" . $t["name"]] = $t["name"];
634 }
635 return $options;
636 }
637 return array();
638 }

References $a_type, PHPMailer\PHPMailer\$options, $style, $t, and getStyle().

Referenced by ilPCTabsGUI\initForm().

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

◆ moveAfter()

ilPageContentGUI::moveAfter ( )

move content element after another element

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

361 {
363
364 // check if a target is selected
365 if (!isset($_POST["target"])) {
366 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
367 }
368
369 // check if only one target is selected
370 if (count($_POST["target"]) > 1) {
371 $ilErr->raiseError($this->lng->txt("only_one_target"), $ilErr->MESSAGE);
372 }
373
374 $a_hid = explode(":", $_POST["target"][0]);
375 //echo "-".$a_hid[0]."-".$a_hid[1]."-";
376
377 // check if target is within source
378 if ($this->hier_id == substr($a_hid[0], 0, strlen($this->hier_id))) {
379 $ilErr->raiseError($this->lng->txt("cont_target_within_source"), $ilErr->MESSAGE);
380 }
381
382 // check whether target is allowed
383 $curr_node = $this->pg_obj->getContentNode($a_hid[0], $a_hid[1]);
384 if (is_object($curr_node) && $curr_node->node_name() == "FileItem") {
385 $ilErr->raiseError($this->lng->txt("cont_operation_not_allowed"), $ilErr->MESSAGE);
386 }
387
388 // strip "c" "r" of table ids from hierarchical id
389 $first_hier_character = substr($a_hid[0], 0, 1);
390 if ($first_hier_character == "c" ||
391 $first_hier_character == "r" ||
392 $first_hier_character == "i") {
393 $a_hid[0] = substr($a_hid[0], 1);
394 }
395
396 // move
397 $updated = $this->pg_obj->moveContentAfter(
398 $this->hier_id,
399 $a_hid[0],
400 $this->content_obj->getPcId(),
401 $a_hid[1]
402 );
403 if ($updated !== true) {
404 $_SESSION["il_pg_error"] = $updated;
405 } else {
406 unset($_SESSION["il_pg_error"]);
407 }
408 $this->log->debug("return to parent jump" . $this->hier_id);
409 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
410 }
$_POST["username"]
$ilErr
Definition: raiseError.php:18

References $_POST, $_SESSION, $error, $ilErr, and $updated.

◆ moveBefore()

ilPageContentGUI::moveBefore ( )

move content element before another element

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

416 {
418
419 // check if a target is selected
420 if (!isset($_POST["target"])) {
421 $ilErr->raiseError($this->lng->txt("no_checkbox"), $ilErr->MESSAGE);
422 }
423
424 // check if target is within source
425 if (count($_POST["target"]) > 1) {
426 $ilErr->raiseError($this->lng->txt("only_one_target"), $ilErr->MESSAGE);
427 }
428
429 $a_hid = explode(":", $_POST["target"][0]);
430
431 // check if target is within source
432 if ($this->hier_id == substr($a_hid[0], 0, strlen($this->hier_id))) {
433 $ilErr->raiseError($this->lng->txt("cont_target_within_source"), $ilErr->MESSAGE);
434 }
435
436 // check whether target is allowed
437 $curr_node = $this->pg_obj->getContentNode($a_hid[0], $a_hid[1]);
438 if (is_object($curr_node) && $curr_node->node_name() == "FileItem") {
439 $ilErr->raiseError($this->lng->txt("cont_operation_not_allowed"), $ilErr->MESSAGE);
440 }
441
442 // strip "c" "r" of table ids from hierarchical id
443 $first_hier_character = substr($a_hid[0], 0, 1);
444 if ($first_hier_character == "c" ||
445 $first_hier_character == "r" ||
446 $first_hier_character == "i") {
447 $a_hid[0] = substr($a_hid[0], 1);
448 }
449
450 // move
451 $updated = $this->pg_obj->moveContentBefore(
452 $this->hier_id,
453 $a_hid[0],
454 $this->content_obj->getPcId(),
455 $a_hid[1]
456 );
457 if ($updated !== true) {
458 $_SESSION["il_pg_error"] = $updated;
459 } else {
460 unset($_SESSION["il_pg_error"]);
461 }
462 $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
463 }

References $_POST, $_SESSION, $error, $ilErr, and $updated.

◆ setCharacteristics()

ilPageContentGUI::setCharacteristics (   $a_chars)

◆ setContentObject()

ilPageContentGUI::setContentObject (   $a_val)

Set content object.

Parameters
object$a_valcontent object

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

88 {
89 $this->content_obj = $a_val;
90 }

◆ setHierId()

ilPageContentGUI::setHierId (   $a_hier_id)

get hierarchical id in dom object

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

247 {
248 $this->hier_id = $a_hier_id;
249 }

Referenced by ilPCDataTableGUI\afterCreation(), ilPCGridGUI\afterCreation(), ilPCTabsGUI\afterCreation(), ilPCMediaObjectGUI\create(), and ilPCInteractiveImageGUI\create().

+ Here is the caller graph for this function:

◆ setPage()

ilPageContentGUI::setPage (   $a_val)

Set page.

Parameters
object$a_valpage object

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

108 {
109 $this->pg_obj = $a_val;
110 }

◆ setPageConfig()

ilPageContentGUI::setPageConfig (   $a_val)

Set Page Config.

Parameters
objectPage Config

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

128 {
129 $this->page_config = $a_val;
130 }

◆ setStyleId()

ilPageContentGUI::setStyleId (   $a_styleid)

Set Style Id.

Parameters
int$a_styleidStyle Id

Reimplemented in ilPCPlaceHolderGUI.

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

157 {
158 $this->styleid = $a_styleid;
159 }

◆ splitPage()

ilPageContentGUI::splitPage ( )

split page to new page at specified position

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

470 {
472
473 if ($this->pg_obj->getParentType() != "lm") {
474 $ilErr->raiseError("Split method called for wrong parent type (" .
475 $this->pg_obj->getParentType() . ")", $ilErr->FATAL);
476 } else {
478 $this->pg_obj->getId(),
479 $this->pg_obj->getParentType(),
480 $this->hier_id
481 );
482
483 // jump to new page
484 $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $lm_page->getId());
485 $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
486 }
487
488 $this->ctrl->returnToParent($this, "jump" . ($this->hier_id - 1));
489 }
static _splitPage($a_page_id, $a_pg_parent_type, $a_hier_id)
split page at hierarchical id

References $error, $ilErr, and ilLMPageObject\_splitPage().

+ Here is the call graph for this function:

◆ splitPageNext()

ilPageContentGUI::splitPageNext ( )

split page to next page at specified position

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

495 {
497
498 if ($this->pg_obj->getParentType() != "lm") {
499 $ilErr->raiseError("Split method called for wrong parent type (" .
500 $this->pg_obj->getParentType() . ")", $ilErr->FATAL);
501 } else {
503 $this->pg_obj->getId(),
504 $this->pg_obj->getParentType(),
505 $this->hier_id
506 );
507
508 // jump to successor page
509 if ($succ_id > 0) {
510 $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $succ_id);
511 $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
512 }
513 }
514 $this->ctrl->returnToParent($this, "jump" . ($this->hier_id - 1));
515 }
static _splitPageNext($a_page_id, $a_pg_parent_type, $a_hier_id)
split page to next page at hierarchical id

References $error, $ilErr, and ilLMPageObject\_splitPageNext().

+ Here is the call graph for this function:

Field Documentation

◆ $common_bb_buttons

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 45 of file class.ilPageContentGUI.php.

Referenced by _getCommonBBButtons().

◆ $content_obj

ilPageContentGUI::$content_obj

◆ $ctrl

ilPageContentGUI::$ctrl

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

Referenced by ilPCFileListGUI\addFileItem(), ilPCInteractiveImageGUI\addPopup(), ilPCTabsGUI\addTab(), ilPCDataTableGUI\afterCreation(), ilPCTabsGUI\afterCreation(), ilPCTabsGUI\cancelTabDeletion(), ilPCInteractiveImageGUI\confirmDeleteOverlays(), ilPCInteractiveImageGUI\confirmPopupDeletion(), ilPCTabsGUI\confirmTabsDeletion(), ilPCQuestionGUI\copyQuestion(), ilPCContentIncludeGUI\create(), ilPCInteractiveImageGUI\create(), ilPCListGUI\create(), ilPCParagraphGUI\createJS(), ilPCGridGUI\deleteCells(), ilPCFileListGUI\deleteFileItem(), ilPCInteractiveImageGUI\deleteOverlays(), ilPCInteractiveImageGUI\deletePopups(), ilPCTabsGUI\deleteTabs(), ilPCLoginPageElementGUI\edit(), ilPCMapGUI\edit(), ilPCPluggedGUI\edit(), ilPCQuestionOverviewGUI\edit(), ilPCResourcesGUI\edit(), ilPCInteractiveImageGUI\edit(), ilPCQuestionGUI\edit(), ilPCTableGUI\edit(), ilPCTabsGUI\edit(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCDataTableGUI\editData(), ilPCDataTableGUI\editDataCl(), ilPCFileListGUI\editFiles(), ilPCTabsGUI\editProperties(), ilPCPluggedGUI\executeCommand(), ilPCQuestionGUI\executeCommand(), ilPCQuestionGUI\feedback(), getBBMenu(), ilPCInteractiveImageGUI\getTabs(), ilPCFileItemGUI\initAddFileForm(), ilPCInteractiveImageGUI\initAddOverlaysForm(), ilPCFileListGUI\initEditForm(), ilPCConsultationHoursGUI\initForm(), ilPCMyCoursesGUI\initForm(), ilPCAMDPageListGUI\initForm(), ilPCBlogGUI\initForm(), ilPCProfileGUI\initForm(), ilPCSectionGUI\initForm(), ilPCSkillsGUI\initForm(), ilPCVerificationGUI\initForm(), ilPCLearningHistoryGUI\initForm(), ilPCMapGUI\initForm(), ilPCInteractiveImageGUI\initForm(), ilPCTabsGUI\initForm(), ilPCContentTemplateGUI\initForm(), ilPCBlogGUI\initPostingForm(), ilPCTableGUI\initPropertiesForm(), ilPCQuestionGUI\insert(), ilPCInteractiveImageGUI\insert(), ilPCTableGUI\insert(), ilPCContentIncludeGUI\insertFromPool(), ilPCQuestionGUI\insertFromPool(), ilPCFileItemGUI\insertFromRepository(), ilPCFileListGUI\insertFromRepository(), ilPCFileItemGUI\insertFromWorkspace(), ilPCFileListGUI\insertFromWorkspace(), ilPCInteractiveImageGUI\listContentPopups(), ilPCInteractiveImageGUI\listOverlayImages(), ilPCQuestionGUI\listPoolQuestions(), ilPCContentIncludeGUI\poolSelection(), ilPCQuestionGUI\poolSelection(), ilPCParagraphGUI\saveJS(), ilPCInteractiveImageGUI\savePopups(), ilPCFileListGUI\savePositions(), ilPCFileListGUI\savePositionsAndClasses(), ilPCListGUI\saveProperties(), ilPCTabsGUI\saveTabs(), ilPCContentIncludeGUI\selectPool(), ilPCQuestionGUI\selectPool(), ilPCTableGUI\setCellPropertiesSubTabs(), ilPCQuestionGUI\setInsertTabs(), ilPCFileListGUI\setItemTabs(), ilPCFileItemGUI\setTabs(), ilPCFileListGUI\setTabs(), ilPCDataTableGUI\setTabs(), ilPCQuestionGUI\setTabs(), ilPCTableGUI\setTabs(), ilPCTabsGUI\setTabs(), ilPCDataTableGUI\tableAction(), ilPCInteractiveImageGUI\update(), ilPCDataTableGUI\updateJS(), and ilPCInteractiveImageGUI\uploadOverlayImages().

◆ $dom

ilPageContentGUI::$dom

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

◆ $error

ilPageContentGUI::$error
protected

◆ $hier_id

ilPageContentGUI::$hier_id

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

Referenced by ilPCQuestionGUI\create(), and getHierId().

◆ $lng

ilPageContentGUI::$lng

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

Referenced by __construct(), ilPCTableGUI\_addAlignmentCheckboxes(), ilPCTableGUI\_addSpanInputs(), ilPCTableGUI\_addStyleCheckboxes(), ilPCTableGUI\_addWidthInputs(), ilPCParagraphGUI\_getStandardCharacteristics(), ilPCSectionGUI\_getStandardCharacteristics(), ilPCParagraphGUI\_getStandardTextCharacteristics(), ilPCInteractiveImageGUI\addPopup(), ilPCTabsGUI\addTab(), ilPCMediaObjectGUI\changeObjectReference(), ilPCInteractiveImageGUI\confirmDeleteOverlays(), ilPCInteractiveImageGUI\confirmPopupDeletion(), ilPCTabsGUI\confirmTabsDeletion(), copy(), ilPCMediaObjectGUI\create(), ilPCContentIncludeGUI\create(), ilPCInteractiveImageGUI\create(), ilPCListGUI\create(), ilPCQuestionGUI\create(), ilPCTableGUI\create(), ilPCTabsGUI\create(), ilPCFileListGUI\createFileItem(), cut(), ilPCInteractiveImageGUI\deleteOverlays(), ilPCInteractiveImageGUI\deletePopups(), ilPCLoginPageElementGUI\edit(), ilPCMapGUI\edit(), ilPCPluggedGUI\edit(), ilPCQuestionOverviewGUI\edit(), ilPCResourcesGUI\edit(), ilPCTableGUI\edit(), ilPCTabsGUI\edit(), ilPCInteractiveImageGUI\editBaseImage(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCDataTableGUI\editData(), ilPCDataTableGUI\editDataCl(), ilPCFileListGUI\editFiles(), ilPCTabsGUI\editProperties(), ilPCMediaObjectGUI\editStyle(), ilPCInteractiveImageGUI\executeCommand(), ilPCMediaObjectGUI\executeCommand(), ilPCPluggedGUI\executeCommand(), ilPCQuestionGUI\executeCommand(), ilPCMediaObjectGUI\getAliasValues(), getBBMenu(), ilPCParagraphGUI\getCharStyleSelector(), ilPCLearningHistoryGUI\getPlaceholderPresentation(), ilPCInteractiveImageGUI\getTabs(), ilPCPlaceHolderGUI\getTypeCaptions(), ilPCFileItemGUI\initAddFileForm(), ilPCInteractiveImageGUI\initAddOverlaysForm(), ilPCMediaObjectGUI\initAliasForm(), ilPCFileListGUI\initEditForm(), ilPCConsultationHoursGUI\initForm(), ilPCBlogGUI\initForm(), ilPCSectionGUI\initForm(), ilPCSkillsGUI\initForm(), ilPCVerificationGUI\initForm(), ilPCLearningHistoryGUI\initForm(), ilPCMapGUI\initForm(), ilPCInteractiveImageGUI\initForm(), ilPCTabsGUI\initForm(), ilPCContentTemplateGUI\initForm(), ilPCListGUI\initListForm(), ilPCTableGUI\initPropertiesForm(), ilPCQuestionGUI\insert(), ilPCInteractiveImageGUI\insert(), ilPCMediaObjectGUI\insert(), ilPCTableGUI\insert(), ilPCMediaObjectGUI\insertFromPool(), ilPCContentIncludeGUI\insertFromPool(), ilPCQuestionGUI\insertFromPool(), ilPCParagraphGUI\insertHelp(), ilPCResourcesGUI\insertResourcesIntoPageContent(), ilPCInteractiveImageGUI\listContentPopups(), ilPCInteractiveImageGUI\listOverlayImages(), ilPCQuestionGUI\listPoolQuestions(), ilPCFileItemGUI\newFileItem(), ilPCPlaceHolderGUI\propertyGUI(), ilPCInteractiveImageGUI\savePopups(), ilPCListGUI\saveProperties(), ilPCTabsGUI\saveTabs(), ilPCMediaObjectGUI\selectObjectReference(), ilPCTableGUI\setAlignment(), ilPCTableGUI\setCellPropertiesSubTabs(), ilPCQuestionGUI\setInsertTabs(), ilPCTableGUI\setSpans(), ilPCTableGUI\setStyles(), ilPCFileListGUI\setTabs(), ilPCQuestionGUI\setTabs(), ilPCTableGUI\setTabs(), ilPCTabsGUI\setTabs(), ilPCTableGUI\setWidths(), ilPCPlaceHolderGUI\textCOSelectionGUI(), ilPCDataTableGUI\update(), ilPCInteractiveImageGUI\update(), ilPCDataTableGUI\updateJS(), and ilPCInteractiveImageGUI\uploadOverlayImages().

◆ $log

ilPageContentGUI::$log
protected

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

◆ $page_config

ilPageContentGUI::$page_config = null

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

Referenced by getPageConfig().

◆ $pg_obj

ilPageContentGUI::$pg_obj

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

Referenced by getPage().

◆ $return_location

ilPageContentGUI::$return_location

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

◆ $style_selector_reset

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

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

◆ $target_script

ilPageContentGUI::$target_script

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

◆ $tpl

ilPageContentGUI::$tpl

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

Referenced by __construct(), ilPCInteractiveImageGUI\addOverlayImages(), ilPCInteractiveImageGUI\confirmDeleteOverlays(), ilPCInteractiveImageGUI\confirmPopupDeletion(), ilPCTabsGUI\confirmTabsDeletion(), ilPCContentTemplateGUI\create(), ilPCListGUI\create(), ilPCMapGUI\create(), ilPCLoginPageElementGUI\edit(), ilPCMapGUI\edit(), ilPCParagraphGUI\edit(), ilPCPluggedGUI\edit(), ilPCQuestionOverviewGUI\edit(), ilPCResourcesGUI\edit(), ilPCSectionGUI\edit(), ilPCInteractiveImageGUI\edit(), ilPCTableGUI\edit(), ilPCTabsGUI\edit(), ilPCConsultationHoursGUI\edit(), ilPCMyCoursesGUI\edit(), ilPCAMDPageListGUI\edit(), ilPCBlogGUI\edit(), ilPCProfileGUI\edit(), ilPCSkillsGUI\edit(), ilPCVerificationGUI\edit(), ilPCLearningHistoryGUI\edit(), ilPCMediaObjectGUI\editAlias(), ilPCInteractiveImageGUI\editBaseImage(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCDataTableGUI\editDataCl(), ilPCFileListGUI\editFiles(), ilPCBlogGUI\editPosting(), ilPCTabsGUI\editProperties(), ilPCMediaObjectGUI\editStyle(), ilPCInteractiveImageGUI\executeCommand(), ilPCMediaObjectGUI\executeCommand(), ilPCQuestionGUI\executeCommand(), ilPCListGUI\getValues(), ilPCTabsGUI\initForm(), ilPCTableGUI\initPropertiesForm(), ilPCTabsGUI\insert(), ilPCInteractiveImageGUI\insert(), ilPCMediaObjectGUI\insert(), ilPCContentTemplateGUI\insert(), ilPCMapGUI\insert(), ilPCTableGUI\insert(), ilPCConsultationHoursGUI\insert(), ilPCMyCoursesGUI\insert(), ilPCAMDPageListGUI\insert(), ilPCBlogGUI\insert(), ilPCProfileGUI\insert(), ilPCSkillsGUI\insert(), ilPCVerificationGUI\insert(), ilPCLearningHistoryGUI\insert(), ilPCMediaObjectGUI\insertFromPool(), ilPCContentIncludeGUI\insertFromPool(), ilPCQuestionGUI\insertFromPool(), ilPCFileItemGUI\insertFromRepository(), ilPCFileListGUI\insertFromRepository(), ilPCFileItemGUI\insertFromWorkspace(), ilPCFileListGUI\insertFromWorkspace(), ilPCBlogGUI\insertPosting(), ilPCResourcesGUI\insertResourcesIntoPageContent(), ilPCInteractiveImageGUI\listContentPopups(), ilPCInteractiveImageGUI\listOverlayImages(), ilPCQuestionGUI\listPoolQuestions(), ilPCMediaObjectGUI\poolSelection(), ilPCContentIncludeGUI\poolSelection(), ilPCQuestionGUI\poolSelection(), ilPCListGUI\saveProperties(), and ilPCMapGUI\update().

◆ $updated

ilPageContentGUI::$updated

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

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


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