ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 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 public.

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

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

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  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:

Member Function Documentation

◆ _getCommonBBButtons()

static ilPageContentGUI::_getCommonBBButtons ( )
static

Get common bb buttons.

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

Referenced by ilPageObjectGUI\getTinyMenu(), ilPCParagraph\handleAjaxContent(), ilObjAdvancedEditingGUI\initPageEditorForm(), ilObjAdvancedEditingGUI\savePageEditorSettingsObject(), and ilPCParagraphGUI\xml2outputJS().

146  {
147  return self::$common_bb_buttons;
148  }
+ Here is the caller graph for this function:

◆ cancel()

ilPageContentGUI::cancel ( )

Cancel.

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

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

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.

References $content_obj, $lng, and array.

610  {
611  $lng = $this->lng;
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  }
Create styles array
The data for the language used.

◆ cut()

ilPageContentGUI::cut ( )

Cut single element.

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

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

589  {
590  $lng = $this->lng;
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"]
Create styles array
The data for the language used.

◆ deactivate()

ilPageContentGUI::deactivate ( )

gui function set enabled if is not enabled and vice versa

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

References $_SESSION, $content_obj, and $updated.

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  }
$_SESSION["AccountId"]

◆ delete()

ilPageContentGUI::delete ( )

delete content element

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

References $_SESSION, and $updated.

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  }
$_SESSION["AccountId"]

◆ displayValidationError()

ilPageContentGUI::displayValidationError ( )

display validation errors

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

References $error, and ilUtil\sendFailure().

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

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.
+ 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.

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

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

255  {
256  $lng = $this->lng;
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  }
$style
Definition: example_012.php:70
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
getStyle()
Get style object.
getPageConfig()
Get Page Config.
global $ilCtrl
Definition: ilias.php:18
static getCharStyleSelector($a_par_type, $a_use_callback=true, $a_style_id=0)
Get character style selector.
special template class to simplify handling of ITX/PEAR
getStyleId()
Get Style Id.
Create styles array
The data for the language used.
static lookupSettingByParentType($a_par_type, $a_name, $a_default=false)
Lookup setting by parent type.
if(strpos($jquery_path, './')===0) elseif(strpos($jquery_path, '.')===0) $mathJaxSetting
Definition: latex.php:32
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCharacteristics()

ilPageContentGUI::getCharacteristics ( )

Get characteristics.

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

References array.

Referenced by ilPCFileListGUI\checkStyleSelection(), ilPCMediaObjectGUI\checkStyleSelection(), ilPCTableGUI\editCellStyle(), ilPCMediaObjectGUI\editStyle(), ilPCSectionGUI\initForm(), ilPCListGUI\initListForm(), ilPCTableGUI\initPropertiesForm(), ilPCParagraphGUI\insertCharacteristicTable(), and ilPCParagraphGUI\insertStyleSelectionList().

229  {
230  return $this->chars ? $this->chars : array();
231  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getCharacteristicsOfCurrentStyle()

ilPageContentGUI::getCharacteristicsOfCurrentStyle (   $a_type)
protected

Get characteristics of current style.

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

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

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

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  }
$style
Definition: example_012.php:70
$a_type
Definition: workflow.php:92
setCharacteristics($a_chars)
Set Characteristics.
getStyleId()
Get Style Id.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
Class ilObjStyleSheet.
+ 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.

References $content_obj.

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

◆ getHierId()

◆ getPage()

◆ getPageConfig()

◆ getStyle()

ilPageContentGUI::getStyle ( )

Get style object.

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

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

Referenced by getBBMenu(), and getTemplateOptions().

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  }
$style
Definition: example_012.php:70
"color:#CC0000 style
Definition: example_001.php:92
getStyleId()
Get Style Id.
static _lookupType($a_id, $a_reference=false)
lookup object type
Class ilObjStyleSheet.
+ 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

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

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

167  {
168  return $this->styleid;
169  }
+ Here is the caller graph for this function:

◆ getTemplateOptions()

ilPageContentGUI::getTemplateOptions (   $a_type)

Get table templates.

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

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

Referenced by ilPCTabsGUI\initForm().

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  }
$style
Definition: example_012.php:70
getStyle()
Get style object.
$a_type
Definition: workflow.php:92
Create styles array
The data for the language used.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
+ 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.

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

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  }
global $ilErr
Definition: raiseError.php:16
$_SESSION["AccountId"]
$_POST["username"]

◆ moveBefore()

ilPageContentGUI::moveBefore ( )

move content element before another element

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

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

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  }
global $ilErr
Definition: raiseError.php:16
$_SESSION["AccountId"]
$_POST["username"]

◆ 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.

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

247  {
248  $this->hier_id = $a_hier_id;
249  }
+ 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

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.

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

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 {
477  $lm_page = ilLMPageObject::_splitPage(
478  $this->pg_obj->getId(),
479  $this->pg_obj->getParentType(),
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  }
global $ilErr
Definition: raiseError.php:16
static _splitPage($a_page_id, $a_pg_parent_type, $a_hier_id)
split page at hierarchical id
+ 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.

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

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(),
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  }
global $ilErr
Definition: raiseError.php:16
static _splitPageNext($a_page_id, $a_pg_parent_type, $a_hier_id)
split page to next page at hierarchical id
+ Here is the call graph for this function:

Field Documentation

◆ $common_bb_buttons

ilPageContentGUI::$common_bb_buttons
staticprotected
Initial value:
"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.

◆ $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(), ilPCTabsGUI\afterCreation(), ilPCDataTableGUI\afterCreation(), ilPCTabsGUI\cancelTabDeletion(), ilPCInteractiveImageGUI\confirmDeleteOverlays(), ilPCInteractiveImageGUI\confirmPopupDeletion(), ilPCTabsGUI\confirmTabsDeletion(), ilPCQuestionGUI\copyQuestion(), ilPCListGUI\create(), ilPCContentIncludeGUI\create(), ilPCInteractiveImageGUI\create(), ilPCParagraphGUI\createJS(), ilPCGridGUI\deleteCells(), ilPCFileListGUI\deleteFileItem(), ilPCInteractiveImageGUI\deleteOverlays(), ilPCInteractiveImageGUI\deletePopups(), ilPCTabsGUI\deleteTabs(), ilPCQuestionOverviewGUI\edit(), ilPCResourcesGUI\edit(), ilPCLoginPageElementGUI\edit(), ilPCMapGUI\edit(), ilPCPluggedGUI\edit(), ilPCTableGUI\edit(), ilPCInteractiveImageGUI\edit(), ilPCQuestionGUI\edit(), ilPCTabsGUI\edit(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCDataTableGUI\editData(), ilPCDataTableGUI\editDataCl(), ilPCFileListGUI\editFiles(), ilPCTabsGUI\editProperties(), ilPCQuestionGUI\executeCommand(), ilPCPluggedGUI\executeCommand(), ilPCQuestionGUI\feedback(), getBBMenu(), ilPCInteractiveImageGUI\getTabs(), ilPCFileItemGUI\initAddFileForm(), ilPCInteractiveImageGUI\initAddOverlaysForm(), ilPCFileListGUI\initEditForm(), ilPCContentTemplateGUI\initForm(), ilPCAMDPageListGUI\initForm(), ilPCMyCoursesGUI\initForm(), ilPCConsultationHoursGUI\initForm(), ilPCBlogGUI\initForm(), ilPCTabsGUI\initForm(), ilPCProfileGUI\initForm(), ilPCVerificationGUI\initForm(), ilPCMapGUI\initForm(), ilPCSectionGUI\initForm(), ilPCSkillsGUI\initForm(), ilPCInteractiveImageGUI\initForm(), ilPCBlogGUI\initPostingForm(), ilPCTableGUI\initPropertiesForm(), ilPCInteractiveImageGUI\insert(), ilPCQuestionGUI\insert(), ilPCTableGUI\insert(), ilPCContentIncludeGUI\insertFromPool(), ilPCQuestionGUI\insertFromPool(), ilPCFileListGUI\insertFromRepository(), ilPCFileItemGUI\insertFromRepository(), ilPCFileListGUI\insertFromWorkspace(), ilPCFileItemGUI\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(), ilPCTableGUI\setTabs(), ilPCDataTableGUI\setTabs(), ilPCFileItemGUI\setTabs(), ilPCQuestionGUI\setTabs(), ilPCFileListGUI\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

◆ $lng

ilPageContentGUI::$lng

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

Referenced by __construct(), ilPCTableGUI\_addAlignmentCheckboxes(), ilPCTableGUI\_addSpanInputs(), ilPCTableGUI\_addStyleCheckboxes(), ilPCTableGUI\_addWidthInputs(), ilPCSectionGUI\_getStandardCharacteristics(), ilPCParagraphGUI\_getStandardCharacteristics(), ilPCInteractiveImageGUI\addPopup(), ilPCTabsGUI\addTab(), ilPCMediaObjectGUI\changeObjectReference(), ilPCInteractiveImageGUI\confirmDeleteOverlays(), ilPCInteractiveImageGUI\confirmPopupDeletion(), ilPCTabsGUI\confirmTabsDeletion(), copy(), ilPCListGUI\create(), ilPCContentIncludeGUI\create(), ilPCQuestionGUI\create(), ilPCInteractiveImageGUI\create(), ilPCTabsGUI\create(), ilPCMediaObjectGUI\create(), ilPCTableGUI\create(), ilPCFileListGUI\createFileItem(), cut(), ilPCInteractiveImageGUI\deleteOverlays(), ilPCInteractiveImageGUI\deletePopups(), ilPCQuestionOverviewGUI\edit(), ilPCResourcesGUI\edit(), ilPCLoginPageElementGUI\edit(), ilPCMapGUI\edit(), ilPCPluggedGUI\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(), ilPCQuestionGUI\executeCommand(), ilPCPluggedGUI\executeCommand(), ilPCMediaObjectGUI\executeCommand(), ilPCMediaObjectGUI\getAliasValues(), getBBMenu(), ilPCParagraphGUI\getCharStyleSelector(), ilPCInteractiveImageGUI\getTabs(), ilPCPlaceHolderGUI\getTypeCaptions(), ilPCFileItemGUI\initAddFileForm(), ilPCInteractiveImageGUI\initAddOverlaysForm(), ilPCMediaObjectGUI\initAliasForm(), ilPCFileListGUI\initEditForm(), ilPCContentTemplateGUI\initForm(), ilPCConsultationHoursGUI\initForm(), ilPCBlogGUI\initForm(), ilPCTabsGUI\initForm(), ilPCVerificationGUI\initForm(), ilPCMapGUI\initForm(), ilPCSectionGUI\initForm(), ilPCSkillsGUI\initForm(), ilPCInteractiveImageGUI\initForm(), ilPCListGUI\initListForm(), ilPCTableGUI\initPropertiesForm(), ilPCInteractiveImageGUI\insert(), ilPCQuestionGUI\insert(), ilPCMediaObjectGUI\insert(), ilPCTableGUI\insert(), ilPCContentIncludeGUI\insertFromPool(), ilPCMediaObjectGUI\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(), ilPCTableGUI\setTabs(), ilPCFileListGUI\setTabs(), ilPCQuestionGUI\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(), ilPCListGUI\create(), ilPCContentTemplateGUI\create(), ilPCMapGUI\create(), ilPCQuestionOverviewGUI\edit(), ilPCAMDPageListGUI\edit(), ilPCResourcesGUI\edit(), ilPCMyCoursesGUI\edit(), ilPCConsultationHoursGUI\edit(), ilPCBlogGUI\edit(), ilPCLoginPageElementGUI\edit(), ilPCMapGUI\edit(), ilPCProfileGUI\edit(), ilPCVerificationGUI\edit(), ilPCSkillsGUI\edit(), ilPCSectionGUI\edit(), ilPCPluggedGUI\edit(), ilPCParagraphGUI\edit(), ilPCTableGUI\edit(), ilPCInteractiveImageGUI\edit(), ilPCTabsGUI\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(), ilPCQuestionGUI\executeCommand(), ilPCMediaObjectGUI\executeCommand(), ilPCListGUI\getValues(), ilPCTabsGUI\initForm(), ilPCTableGUI\initPropertiesForm(), ilPCMyCoursesGUI\insert(), ilPCAMDPageListGUI\insert(), ilPCContentTemplateGUI\insert(), ilPCConsultationHoursGUI\insert(), ilPCBlogGUI\insert(), ilPCTabsGUI\insert(), ilPCMapGUI\insert(), ilPCProfileGUI\insert(), ilPCVerificationGUI\insert(), ilPCSkillsGUI\insert(), ilPCInteractiveImageGUI\insert(), ilPCMediaObjectGUI\insert(), ilPCTableGUI\insert(), ilPCContentIncludeGUI\insertFromPool(), ilPCMediaObjectGUI\insertFromPool(), ilPCQuestionGUI\insertFromPool(), ilPCFileListGUI\insertFromRepository(), ilPCFileItemGUI\insertFromRepository(), ilPCFileListGUI\insertFromWorkspace(), ilPCFileItemGUI\insertFromWorkspace(), ilPCBlogGUI\insertPosting(), ilPCResourcesGUI\insertResourcesIntoPageContent(), ilPCInteractiveImageGUI\listContentPopups(), ilPCInteractiveImageGUI\listOverlayImages(), ilPCQuestionGUI\listPoolQuestions(), ilPCContentIncludeGUI\poolSelection(), ilPCMediaObjectGUI\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: