ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
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

 ilPageContentGUI ($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
 
 $ilias
 
 $tpl
 
 $lng
 
 $ctrl
 
 $pg_obj
 
 $hier_id
 
 $dom
 
 $updated
 
 $target_script
 
 $return_location
 
 $page_config = null
 

Protected Member Functions

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

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.

Member Function Documentation

◆ _getCommonBBButtons()

static ilPageContentGUI::_getCommonBBButtons ( )
static

Get common bb buttons.

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

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

123  {
124  return self::$common_bb_buttons;
125  }
+ Here is the caller graph for this function:

◆ cancel()

ilPageContentGUI::cancel ( )

Cancel.

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

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

◆ cancelCreate()

ilPageContentGUI::cancelCreate ( )

cancel creating page content

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

531  {
532  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
533  }

◆ cancelUpdate()

ilPageContentGUI::cancelUpdate ( )

cancel update

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

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

◆ copy()

ilPageContentGUI::copy ( )

Copy single element.

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

References $content_obj, $lng, and ilUtil\sendSuccess().

604  {
605  global $lng;
606 
607  $obj = $this->content_obj;
608 
609  ilUtil::sendSuccess($lng->txt("cont_sel_el_copied_use_paste"), true);
610  $this->pg_obj->copyContents(array($this->hier_id.":".$this->pc_id));
611 
612  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
613  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
+ Here is the call graph for this function:

◆ cut()

ilPageContentGUI::cut ( )

Cut single element.

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

References $_SESSION, $content_obj, $lng, $updated, and ilUtil\sendSuccess().

581  {
582  global $lng;
583 
584  $obj = $this->content_obj;
585 
586  $updated = $this->pg_obj->cutContents(array($this->hier_id.":".$this->pc_id));
587  if($updated !== true)
588  {
589  $_SESSION["il_pg_error"] = $updated;
590  }
591  else
592  {
593  unset($_SESSION["il_pg_error"]);
594  }
595 
596  ilUtil::sendSuccess($lng->txt("cont_sel_el_cut_use_paste"), true);
597  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
598  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
+ 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 555 of file class.ilPageContentGUI.php.

References $_SESSION, $content_obj, and $updated.

556  {
557  $obj = & $this->content_obj;
558 
559  if ($obj->isEnabled ())
560  $obj->disable ();
561  else
562  $obj->enable ();
563 
564  $updated = $this->pg_obj->update($this->hier_id);
565  if($updated !== true)
566  {
567  $_SESSION["il_pg_error"] = $updated;
568  }
569  else
570  {
571  unset($_SESSION["il_pg_error"]);
572  }
573 
574  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
575  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ delete()

ilPageContentGUI::delete ( )

delete content element

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

References $_SESSION, and $updated.

321  {
322  $updated = $this->pg_obj->deleteContent($this->hier_id);
323  if($updated !== true)
324  {
325  $_SESSION["il_pg_error"] = $updated;
326  }
327  else
328  {
329  unset($_SESSION["il_pg_error"]);
330  }
331  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
332  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']

◆ displayValidationError()

ilPageContentGUI::displayValidationError ( )

display validation errors

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

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

506  {
507  if(is_array($this->updated))
508  {
509  $error_str = "<b>Error(s):</b><br>";
510  foreach ($this->updated as $error)
511  {
512  $err_mess = implode($error, " - ");
513  if (!is_int(strpos($err_mess, ":0:")))
514  {
515  $error_str .= htmlentities($err_mess)."<br />";
516  }
517  }
518  $this->tpl->setVariable("MESSAGE", $error_str);
519  }
520  else if($this->updated != "" && $this->updated !== true)
521  {
522  $this->tpl->setVariable("MESSAGE", "<b>Error(s):</b><br />".
523  $this->updated."<br />");
524  }
525  }
+ 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 241 of file class.ilPageContentGUI.php.

References $ilCtrl, $lng, $mathJaxSetting, ilInternalLinkGUI\getInitHTML(), getPageConfig(), getStyle(), and ilPageEditorSettings\lookupSettingByParentType().

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

242  {
243  global $lng, $ilCtrl;
244 
245  include_once("./Services/COPage/classes/class.ilPageEditorSettings.php");
246 
247  $btpl = new ilTemplate("tpl.bb_menu.html", true, true, "Services/COPage");
248 
249  // not nice, should be set by context per method
250  //if ($this->pg_obj->getParentType() == "gdf" ||
251  // $this->pg_obj->getParentType() == "lm" ||
252  // $this->pg_obj->getParentType() == "dbk")
253  if ($this->getPageConfig()->getEnableInternalLinks())
254  {
255  $btpl->setCurrentBlock("bb_ilink_button");
256  $btpl->setVariable("BB_LINK_ILINK",
257  $this->ctrl->getLinkTargetByClass("ilInternalLinkGUI", "showLinkHelp"));
258  $btpl->parseCurrentBlock();
259 
260  // add int link parts
261  include_once("./Modules/LearningModule/classes/class.ilInternalLinkGUI.php");
262  $btpl->setCurrentBlock("int_link_prep");
263  $btpl->setVariable("INT_LINK_PREP", ilInternalLinkGUI::getInitHTML(
264  $ilCtrl->getLinkTargetByClass(array("ilpageeditorgui", "ilinternallinkgui"),
265  "", false, true, false), true));
266  $btpl->parseCurrentBlock();
267 
268  }
269 
270  if ($this->getPageConfig()->getEnableKeywords())
271  {
272  $btpl->touchBlock("bb_kw_button");
273  $btpl->setVariable("TXT_KW", $this->lng->txt("cont_text_keyword"));
274  }
275  if ($this->pg_obj->getParentType() == "wpg")
276  {
277  $btpl->setCurrentBlock("bb_wikilink_button");
278  $btpl->setVariable("TXT_WLN2", $lng->txt("wiki_wiki_page"));
279  $btpl->parseCurrentBlock();
280  }
281  $mathJaxSetting = new ilSetting("MathJax");
282  $style = $this->getStyle();
283 //echo URL_TO_LATEX;
284  foreach (self::$common_bb_buttons as $c => $st)
285  {
286  if (ilPageEditorSettings::lookupSettingByParentType($this->pg_obj->getParentType(), "active_".$c, true))
287  {
288  if ($c != "tex" || $mathJaxSetting->get("enable") || defined("URL_TO_LATEX"))
289  {
290  $btpl->touchBlock("bb_".$c."_button");
291  $btpl->setVariable("TXT_".strtoupper($c), $this->lng->txt("cont_text_".$c));
292  }
293  }
294  }
295 
296  if ($this->getPageConfig()->getEnableAnchors())
297  {
298  $btpl->touchBlock("bb_anc_button");
299  $btpl->setVariable("TXT_ANC", $lng->txt("cont_anchor").":");
300  }
301 
302  // footnote
303 // $btpl->setVariable("TXT_FN", $this->lng->txt("cont_text_fn"));
304 
305 // $btpl->setVariable("TXT_CODE", $this->lng->txt("cont_text_code"));
306  $btpl->setVariable("TXT_ILN", $this->lng->txt("cont_text_iln"));
307 // $btpl->setVariable("TXT_XLN", $this->lng->txt("cont_text_xln"));
308 // $btpl->setVariable("TXT_TEX", $this->lng->txt("cont_text_tex"));
309  $btpl->setVariable("TXT_BB_TIP", $this->lng->txt("cont_bb_tip"));
310  $btpl->setVariable("TXT_WLN", $lng->txt("wiki_wiki_page"));
311 
312  $btpl->setVariable("PAR_TA_NAME", $a_ta_name);
313 
314  return $btpl->get();
315  }
ILIAS Setting Class.
getStyle()
Get style object.
getPageConfig()
Get Page Config.
global $ilCtrl
Definition: ilias.php:18
special template class to simplify handling of ITX/PEAR
static lookupSettingByParentType($a_par_type, $a_name, $a_default=false)
Lookup setting by parent type.
if(strpos($jquery_path, './')===0) else if(strpos($jquery_path, '.')===0) $mathJaxSetting
Definition: latex.php:34
getInitHTML($a_url, $a_move_to_body=false)
Get initialisation HTML to use interna link editing.
+ 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 168 of file class.ilPageContentGUI.php.

References ilObject\_lookupType(), getStyleId(), and setCharacteristics().

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

169  {
170  if ($this->getStyleId() > 0 &&
171  ilObject::_lookupType($this->getStyleId()) == "sty")
172  {
173  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
174  $style = new ilObjStyleSheet($this->getStyleId());
175  $chars = array();
176  if (!is_array($a_type))
177  {
178  $a_type = array($a_type);
179  }
180  foreach ($a_type as $at)
181  {
182  $chars = array_merge($chars, $style->getCharacteristics($at, true));
183  }
184  $new_chars = array();
185  if (is_array($chars))
186  {
187  foreach ($chars as $char)
188  {
189  if ($this->chars[$char] != "") // keep lang vars for standard chars
190  {
191  $new_chars[$char] = $this->chars[$char];
192  }
193  else
194  {
195  $new_chars[$char] = $char;
196  }
197  asort($new_chars);
198  }
199  }
200  $this->setCharacteristics($new_chars);
201  }
202  }
setCharacteristics($a_chars)
Set Characteristics.
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:

◆ getContentObject()

ilPageContentGUI::getContentObject ( )

Get content object.

Returns
object content object

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

References $content_obj.

75  {
76  return $this->content_obj;
77  }

◆ getHierId()

◆ getPage()

◆ getPageConfig()

◆ getStyle()

ilPageContentGUI::getStyle ( )

Get style object.

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

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

Referenced by getBBMenu(), and getTemplateOptions().

152  {
153  if ((!is_object($this->style) || $this->getStyleId() != $this->style->getId()) && $this->getStyleId() > 0)
154  {
155  if (ilObject::_lookupType($this->getStyleId()) == "sty")
156  {
157  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
158  $this->style = new ilObjStyleSheet($this->getStyleId());
159  }
160  }
161 
162  return $this->style;
163  }
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 143 of file class.ilPageContentGUI.php.

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

144  {
145  return $this->styleid;
146  }
+ Here is the caller graph for this function:

◆ getTemplateOptions()

ilPageContentGUI::getTemplateOptions (   $a_type)

Get table templates.

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

References $options, $t, and getStyle().

Referenced by ilPCTabsGUI\initForm().

620  {
621  $style = $this->getStyle();
622 
623  if (is_object($style))
624  {
625  $ts = $style->getTemplates($a_type);
626  $options = array();
627  foreach ($ts as $t)
628  {
629  $options["t:".$t["id"].":".$t["name"]] = $t["name"];
630  }
631  return $options;
632  }
633  return array();
634  }
getStyle()
Get style object.
if(!is_array($argv)) $options
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ilPageContentGUI()

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

Constructor public.

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

References $ilCtrl, $ilias, $lng, and $tpl.

41  {
42  global $ilias, $tpl, $lng, $ilCtrl;
43  $this->ilias = $ilias;
44  $this->tpl = $tpl;
45  $this->lng = $lng;
46  $this->pg_obj = $a_pg_obj;
47  $this->ctrl = $ilCtrl;
48  $this->content_obj = $a_content_obj;
49 
50  if($a_hier_id !== 0)
51  {
52  $this->hier_id = $a_hier_id;
53  $this->pc_id = $a_pc_id;
54 //echo "-".$this->pc_id."-";
55  $this->dom = $a_pg_obj->getDom();
56  }
57  }
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ moveAfter()

ilPageContentGUI::moveAfter ( )

move content element after another element

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

References $_POST, $_SESSION, and $updated.

338  {
339  // check if a target is selected
340  if(!isset($_POST["target"]))
341  {
342  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
343  }
344 
345  // check if only one target is selected
346  if(count($_POST["target"]) > 1)
347  {
348  $this->ilias->raiseError($this->lng->txt("only_one_target"),$this->ilias->error_obj->MESSAGE);
349  }
350 
351  $a_hid = explode(":", $_POST["target"][0]);
352 //echo "-".$a_hid[0]."-".$a_hid[1]."-";
353 
354  // check if target is within source
355  if($this->hier_id == substr($a_hid[0], 0, strlen($this->hier_id)))
356  {
357  $this->ilias->raiseError($this->lng->txt("cont_target_within_source"),$this->ilias->error_obj->MESSAGE);
358  }
359 
360  // check whether target is allowed
361  $curr_node =& $this->pg_obj->getContentNode($a_hid[0], $a_hid[1]);
362  if (is_object($curr_node) && $curr_node->node_name() == "FileItem")
363  {
364  $this->ilias->raiseError($this->lng->txt("cont_operation_not_allowed"),$this->ilias->error_obj->MESSAGE);
365  }
366 
367  // strip "c" "r" of table ids from hierarchical id
368  $first_hier_character = substr($a_hid[0], 0, 1);
369  if ($first_hier_character == "c" ||
370  $first_hier_character == "r" ||
371  $first_hier_character == "i")
372  {
373  $a_hid[0] = substr($a_hid[0], 1);
374  }
375 
376  // move
377  $updated = $this->pg_obj->moveContentAfter($this->hier_id, $a_hid[0],
378  $this->content_obj->getPcId(), $a_hid[1]);
379  if($updated !== true)
380  {
381  $_SESSION["il_pg_error"] = $updated;
382  }
383  else
384  {
385  unset($_SESSION["il_pg_error"]);
386  }
387 
388  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
389  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ moveBefore()

ilPageContentGUI::moveBefore ( )

move content element before another element

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

References $_POST, $_SESSION, and $updated.

395  {
396  // check if a target is selected
397  if(!isset($_POST["target"]))
398  {
399  $this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
400  }
401 
402  // check if target is within source
403  if(count($_POST["target"]) > 1)
404  {
405  $this->ilias->raiseError($this->lng->txt("only_one_target"),$this->ilias->error_obj->MESSAGE);
406  }
407 
408  $a_hid = explode(":", $_POST["target"][0]);
409 
410  // check if target is within source
411  if($this->hier_id == substr($a_hid[0], 0, strlen($this->hier_id)))
412  {
413  $this->ilias->raiseError($this->lng->txt("cont_target_within_source"),$this->ilias->error_obj->MESSAGE);
414  }
415 
416  // check whether target is allowed
417  $curr_node =& $this->pg_obj->getContentNode($a_hid[0], $a_hid[1]);
418  if (is_object($curr_node) && $curr_node->node_name() == "FileItem")
419  {
420  $this->ilias->raiseError($this->lng->txt("cont_operation_not_allowed"),$this->ilias->error_obj->MESSAGE);
421  }
422 
423  // strip "c" "r" of table ids from hierarchical id
424  $first_hier_character = substr($a_hid[0], 0, 1);
425  if ($first_hier_character == "c" ||
426  $first_hier_character == "r" ||
427  $first_hier_character == "i")
428  {
429  $a_hid[0] = substr($a_hid[0], 1);
430  }
431 
432  // move
433  $updated = $this->pg_obj->moveContentBefore($this->hier_id, $a_hid[0],
434  $this->content_obj->getPcId(), $a_hid[1]);
435  if($updated !== true)
436  {
437  $_SESSION["il_pg_error"] = $updated;
438  }
439  else
440  {
441  unset($_SESSION["il_pg_error"]);
442  }
443  $this->ctrl->returnToParent($this, "jump".$this->hier_id);
444  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
$_POST['username']
Definition: cron.php:12
redirection script todo: (a better solution should control the processing via a xml file) ...

◆ setCharacteristics()

ilPageContentGUI::setCharacteristics (   $a_chars)

◆ setContentObject()

ilPageContentGUI::setContentObject (   $a_val)

Set content object.

Parameters
object$a_valcontent object

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

65  {
66  $this->content_obj = $a_val;
67  }

◆ setHierId()

ilPageContentGUI::setHierId (   $a_hier_id)

get hierarchical id in dom object

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

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

234  {
235  $this->hier_id = $a_hier_id;
236  }
+ Here is the caller graph for this function:

◆ setPage()

ilPageContentGUI::setPage (   $a_val)

Set page.

Parameters
object$a_valpage object

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

85  {
86  $this->pg_obj = $a_val;
87  }

◆ setPageConfig()

ilPageContentGUI::setPageConfig (   $a_val)

Set Page Config.

Parameters
objectPage Config

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

105  {
106  $this->page_config = $a_val;
107  }

◆ setStyleId()

ilPageContentGUI::setStyleId (   $a_styleid)

Set Style Id.

Parameters
int$a_styleidStyle Id

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

134  {
135  $this->styleid = $a_styleid;
136  }

◆ splitPage()

ilPageContentGUI::splitPage ( )

split page to new page at specified position

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

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

451  {
452  global $ilErr;
453 
454  if ($this->pg_obj->getParentType() != "lm" &&
455  $this->pg_obj->getParentType() != "dbk")
456  {
457  $ilErr->raiseError("Split method called for wrong parent type (".
458  $this->pg_obj->getParentType().")", $ilErr->FATAL);
459  }
460  else
461  {
462  $lm_page =& ilLMPageObject::_splitPage($this->pg_obj->getId(),
463  $this->pg_obj->getParentType(), $this->hier_id);
464 
465  // jump to new page
466  $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $lm_page->getId());
467  $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
468  }
469 
470  $this->ctrl->returnToParent($this, "jump".($this->hier_id - 1));
471  }
_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 476 of file class.ilPageContentGUI.php.

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

477  {
478  global $ilErr;
479 
480  if ($this->pg_obj->getParentType() != "lm" &&
481  $this->pg_obj->getParentType() != "dbk")
482  {
483  $ilErr->raiseError("Split method called for wrong parent type (".
484  $this->pg_obj->getParentType().")", $ilErr->FATAL);
485  }
486  else
487  {
488  $succ_id = ilLMPageObject::_splitPageNext($this->pg_obj->getId(),
489  $this->pg_obj->getParentType(), $this->hier_id);
490 
491  // jump to successor page
492  if ($succ_id > 0)
493  {
494  $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $succ_id);
495  $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
496  }
497 
498  }
499  $this->ctrl->returnToParent($this, "jump".($this->hier_id - 1));
500  }
_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:
= array(
"str" => "Strong", "emp" => "Emph", "imp" => "Important", "com" => "Comment",
"quot" => "Quotation", "acc" => "Accent", "code" => "Code", "tex" => "Tex",
"fn" => "Footnote", "xln" => "ExternalLink"
)

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

◆ $content_obj

ilPageContentGUI::$content_obj

◆ $ctrl

ilPageContentGUI::$ctrl

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

◆ $dom

ilPageContentGUI::$dom

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

◆ $hier_id

ilPageContentGUI::$hier_id

◆ $ilias

◆ $lng

ilPageContentGUI::$lng

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

Referenced by ilPCTableGUI\_addAlignmentCheckboxes(), ilPCTableGUI\_addSpanInputs(), ilPCTableGUI\_addStyleCheckboxes(), ilPCTableGUI\_addWidthInputs(), ilPCParagraphGUI\_getStandardCharacteristics(), ilPCSectionGUI\_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(), ilPCSectionGUI\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(), ilPageContentGUI(), ilPCFileItemGUI\initAddFileForm(), ilPCInteractiveImageGUI\initAddOverlaysForm(), ilPCMediaObjectGUI\initAliasForm(), ilPCFileListGUI\initEditForm(), ilPCTabsGUI\initForm(), ilPCConsultationHoursGUI\initForm(), ilPCBlogGUI\initForm(), ilPCVerificationGUI\initForm(), ilPCMapGUI\initForm(), ilPCSkillsGUI\initForm(), ilPCInteractiveImageGUI\initForm(), ilPCListGUI\initListForm(), ilPCTableGUI\initPropertiesForm(), ilPCQuestionGUI\insert(), ilPCInteractiveImageGUI\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(), ilPCQuestionGUI\setTabs(), ilPCFileListGUI\setTabs(), ilPCTabsGUI\setTabs(), ilPCTableGUI\setWidths(), ilPCPlaceHolderGUI\textCOSelectionGUI(), ilPCDataTableGUI\update(), ilPCInteractiveImageGUI\update(), ilPCDataTableGUI\updateJS(), and ilPCInteractiveImageGUI\uploadOverlayImages().

◆ $page_config

ilPageContentGUI::$page_config = null

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

Referenced by getPageConfig().

◆ $pg_obj

ilPageContentGUI::$pg_obj

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

Referenced by getPage().

◆ $return_location

ilPageContentGUI::$return_location

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

◆ $target_script

ilPageContentGUI::$target_script

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

◆ $tpl

ilPageContentGUI::$tpl

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

Referenced by ilPCInteractiveImageGUI\addOverlayImages(), ilPCInteractiveImageGUI\confirmDeleteOverlays(), ilPCInteractiveImageGUI\confirmPopupDeletion(), ilPCTabsGUI\confirmTabsDeletion(), ilPCListGUI\create(), ilPCMapGUI\create(), ilPCQuestionOverviewGUI\edit(), ilPCResourcesGUI\edit(), ilPCConsultationHoursGUI\edit(), ilPCBlogGUI\edit(), ilPCLoginPageElementGUI\edit(), ilPCMapGUI\edit(), ilPCVerificationGUI\edit(), ilPCProfileGUI\edit(), ilPCPluggedGUI\edit(), ilPCSkillsGUI\edit(), ilPCSectionGUI\edit(), ilPCParagraphGUI\edit(), ilPCTableGUI\edit(), ilPCInteractiveImageGUI\edit(), ilPCTabsGUI\edit(), ilPCMediaObjectGUI\editAlias(), ilPCInteractiveImageGUI\editBaseImage(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCDataTableGUI\editData(), ilPCDataTableGUI\editDataCl(), ilPCFileListGUI\editFiles(), ilPCBlogGUI\editPosting(), ilPCTabsGUI\editProperties(), ilPCMediaObjectGUI\editStyle(), ilPCInteractiveImageGUI\executeCommand(), ilPCQuestionGUI\executeCommand(), ilPCMediaObjectGUI\executeCommand(), ilPCListGUI\getValues(), ilPageContentGUI(), ilPCTabsGUI\initForm(), ilPCTableGUI\initPropertiesForm(), ilPCTabsGUI\insert(), ilPCConsultationHoursGUI\insert(), ilPCBlogGUI\insert(), ilPCMapGUI\insert(), ilPCVerificationGUI\insert(), ilPCProfileGUI\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 24 of file class.ilPageContentGUI.php.

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


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