ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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
 
 $ilias
 
 $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

 $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, ilPCLoginPageElementGUI, ilPCPlaceHolderGUI, ilPCSourceCodeGUI, ilPCInteractiveImageGUI, and ilPCMediaObjectGUI.

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

54 {
55 global $ilias, $tpl, $lng, $ilCtrl;
56
57 $this->log = ilLoggerFactory::getLogger('copg');
58
59 $this->ilias = $ilias;
60 $this->tpl = $tpl;
61 $this->lng = $lng;
62 $this->pg_obj = $a_pg_obj;
63 $this->ctrl = $ilCtrl;
64 $this->content_obj = $a_content_obj;
65
66 if($a_hier_id !== 0)
67 {
68 $this->hier_id = $a_hier_id;
69 $this->pc_id = $a_pc_id;
70//echo "-".$this->pc_id."-";
71 $this->dom = $a_pg_obj->getDom();
72 }
73 }
static getLogger($a_component_id)
Get component logger.
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file)

References $ilCtrl, $ilias, $lng, $tpl, 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 572 of file class.ilPageContentGUI.php.

573 {
574 $this->ctrl->returnToParent($this, "jump".$this->hier_id);
575 }

◆ cancelCreate()

ilPageContentGUI::cancelCreate ( )

cancel creating page content

Reimplemented in ilPCSourceCodeGUI.

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

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

◆ cancelUpdate()

ilPageContentGUI::cancelUpdate ( )

cancel update

Reimplemented in ilPCSourceCodeGUI.

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

565 {
566 $this->ctrl->returnToParent($this, "jump".$this->hier_id);
567 }

◆ copy()

ilPageContentGUI::copy ( )

Copy single element.

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

630 {
631 global $lng;
632
633 $obj = $this->content_obj;
634
635 ilUtil::sendSuccess($lng->txt("cont_sel_el_copied_use_paste"), true);
636 $this->pg_obj->copyContents(array($this->hier_id.":".$this->pc_id));
637
638 $this->ctrl->returnToParent($this, "jump".$this->hier_id);
639 }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.

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

+ Here is the call graph for this function:

◆ cut()

ilPageContentGUI::cut ( )

Cut single element.

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

607 {
608 global $lng;
609
610 $obj = $this->content_obj;
611
612 $updated = $this->pg_obj->cutContents(array($this->hier_id.":".$this->pc_id));
613 if($updated !== true)
614 {
615 $_SESSION["il_pg_error"] = $updated;
616 }
617 else
618 {
619 unset($_SESSION["il_pg_error"]);
620 }
621
622 ilUtil::sendSuccess($lng->txt("cont_sel_el_cut_use_paste"), true);
623 $this->ctrl->returnToParent($this, "jump".$this->hier_id);
624 }
$_SESSION["AccountId"]

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

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

582 {
583 $obj = & $this->content_obj;
584
585 if ($obj->isEnabled ())
586 $obj->disable ();
587 else
588 $obj->enable ();
589
590 $updated = $this->pg_obj->update($this->hier_id);
591 if($updated !== true)
592 {
593 $_SESSION["il_pg_error"] = $updated;
594 }
595 else
596 {
597 unset($_SESSION["il_pg_error"]);
598 }
599
600 $this->ctrl->returnToParent($this, "jump".$this->hier_id);
601 }

References $_SESSION, $content_obj, and $updated.

◆ delete()

ilPageContentGUI::delete ( )

delete content element

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

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

References $_SESSION, and $updated.

◆ displayValidationError()

ilPageContentGUI::displayValidationError ( )

display validation errors

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

532 {
533 if(is_array($this->updated))
534 {
535 $error_str = "<b>Error(s):</b><br>";
536 foreach ($this->updated as $error)
537 {
538 $err_mess = implode($error, " - ");
539 if (!is_int(strpos($err_mess, ":0:")))
540 {
541 $error_str .= htmlentities($err_mess)."<br />";
542 }
543 }
544 ilUtil::sendFailure($error_str);
545 }
546 else if($this->updated != "" && $this->updated !== true)
547 {
548 ilUtil::sendFailure("<b>Error(s):</b><br />".
549 $this->updated);
550 }
551 }
$error
Definition: Error.php:17
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(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCDataTableGUI\editData(), ilPCDataTableGUI\editDataCl(), ilPCBlogGUI\editPosting(), ilPCTabsGUI\editProperties(), ilPCMediaObjectGUI\editStyle(), ilPCQuestionGUI\insert(), ilPCTabsGUI\insert(), ilPCInteractiveImageGUI\insert(), ilPCMediaObjectGUI\insert(), ilPCContentTemplateGUI\insert(), ilPCFileListGUI\insert(), ilPCListGUI\insert(), ilPCMapGUI\insert(), ilPCSourceCodeGUI\insert(), ilPCTableGUI\insert(), ilPCConsultationHoursGUI\insert(), ilPCMyCoursesGUI\insert(), ilPCAMDPageListGUI\insert(), ilPCBlogGUI\insert(), ilPCProfileGUI\insert(), ilPCSkillsGUI\insert(), ilPCVerificationGUI\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 257 of file class.ilPageContentGUI.php.

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

References $ilCtrl, $lng, $mathJaxSetting, $style, defined, 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 184 of file class.ilPageContentGUI.php.

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

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

91 {
92 return $this->content_obj;
93 }

References $content_obj.

◆ getHierId()

◆ getPage()

◆ getPageConfig()

◆ getStyle()

ilPageContentGUI::getStyle ( )

Get style object.

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

168 {
169 if ((!is_object($this->style) || $this->getStyleId() != $this->style->getId()) && $this->getStyleId() > 0)
170 {
171 if (ilObject::_lookupType($this->getStyleId()) == "sty")
172 {
173 include_once("./Services/Style/Content/classes/class.ilObjStyleSheet.php");
174 $this->style = new ilObjStyleSheet($this->getStyleId());
175 }
176 }
177
178 return $this->style;
179 }

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

160 {
161 return $this->styleid;
162 }

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

646 {
647 $style = $this->getStyle();
648
649 if (is_object($style))
650 {
651 $ts = $style->getTemplates($a_type);
652 $options = array();
653 foreach ($ts as $t)
654 {
655 $options["t:".$t["id"].":".$t["name"]] = $t["name"];
656 }
657 return $options;
658 }
659 return array();
660 }
if(!is_array($argv)) $options

References $a_type, $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 365 of file class.ilPageContentGUI.php.

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

References $_POST, $_SESSION, and $updated.

◆ moveBefore()

ilPageContentGUI::moveBefore ( )

move content element before another element

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

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

References $_POST, $_SESSION, and $updated.

◆ setCharacteristics()

ilPageContentGUI::setCharacteristics (   $a_chars)

◆ setContentObject()

ilPageContentGUI::setContentObject (   $a_val)

Set content object.

Parameters
object$a_valcontent object

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

81 {
82 $this->content_obj = $a_val;
83 }

◆ setHierId()

ilPageContentGUI::setHierId (   $a_hier_id)

get hierarchical id in dom object

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

250 {
251 $this->hier_id = $a_hier_id;
252 }

Referenced by ilPCDataTableGUI\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 100 of file class.ilPageContentGUI.php.

101 {
102 $this->pg_obj = $a_val;
103 }

◆ setPageConfig()

ilPageContentGUI::setPageConfig (   $a_val)

Set Page Config.

Parameters
objectPage Config

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

121 {
122 $this->page_config = $a_val;
123 }

◆ setStyleId()

ilPageContentGUI::setStyleId (   $a_styleid)

Set Style Id.

Parameters
int$a_styleidStyle Id

Reimplemented in ilPCPlaceHolderGUI.

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

150 {
151 $this->styleid = $a_styleid;
152 }

◆ splitPage()

ilPageContentGUI::splitPage ( )

split page to new page at specified position

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

479 {
480 global $ilErr;
481
482 if ($this->pg_obj->getParentType() != "lm")
483 {
484 $ilErr->raiseError("Split method called for wrong parent type (".
485 $this->pg_obj->getParentType().")", $ilErr->FATAL);
486 }
487 else
488 {
489 $lm_page = ilLMPageObject::_splitPage($this->pg_obj->getId(),
490 $this->pg_obj->getParentType(), $this->hier_id);
491
492 // jump to new page
493 $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $lm_page->getId());
494 $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
495 }
496
497 $this->ctrl->returnToParent($this, "jump".($this->hier_id - 1));
498 }
static _splitPage($a_page_id, $a_pg_parent_type, $a_hier_id)
split page at hierarchical id
global $ilErr
Definition: raiseError.php:16

References $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 503 of file class.ilPageContentGUI.php.

504 {
505 global $ilErr;
506
507 if ($this->pg_obj->getParentType() != "lm")
508 {
509 $ilErr->raiseError("Split method called for wrong parent type (".
510 $this->pg_obj->getParentType().")", $ilErr->FATAL);
511 }
512 else
513 {
514 $succ_id = ilLMPageObject::_splitPageNext($this->pg_obj->getId(),
515 $this->pg_obj->getParentType(), $this->hier_id);
516
517 // jump to successor page
518 if ($succ_id > 0)
519 {
520 $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $succ_id);
521 $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
522 }
523
524 }
525 $this->ctrl->returnToParent($this, "jump".($this->hier_id - 1));
526 }
static _splitPageNext($a_page_id, $a_pg_parent_type, $a_hier_id)
split page to next page at hierarchical id

References $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 41 of file class.ilPageContentGUI.php.

Referenced by _getCommonBBButtons().

◆ $content_obj

ilPageContentGUI::$content_obj

◆ $ctrl

ilPageContentGUI::$ctrl

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

◆ $dom

ilPageContentGUI::$dom

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

◆ $hier_id

ilPageContentGUI::$hier_id

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

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

◆ $ilias

ilPageContentGUI::$ilias

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

Referenced by __construct(), and ilPCParagraphGUI\editMultipleJS().

◆ $lng

ilPageContentGUI::$lng

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

Referenced by __construct(), 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(), 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(), ilPCInteractiveImageGUI\getTabs(), ilPCPlaceHolderGUI\getTypeCaptions(), ilPCFileItemGUI\initAddFileForm(), ilPCInteractiveImageGUI\initAddOverlaysForm(), ilPCMediaObjectGUI\initAliasForm(), ilPCFileListGUI\initEditForm(), ilPCConsultationHoursGUI\initForm(), ilPCBlogGUI\initForm(), ilPCSectionGUI\initForm(), ilPCSkillsGUI\initForm(), ilPCVerificationGUI\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 36 of file class.ilPageContentGUI.php.

◆ $page_config

ilPageContentGUI::$page_config = null

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

Referenced by getPageConfig().

◆ $pg_obj

ilPageContentGUI::$pg_obj

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

Referenced by getPage().

◆ $return_location

ilPageContentGUI::$return_location

Definition at line 30 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 38 of file class.ilPageContentGUI.php.

◆ $target_script

ilPageContentGUI::$target_script

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

◆ $tpl

ilPageContentGUI::$tpl

Definition at line 18 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(), 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(), 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 28 of file class.ilPageContentGUI.php.

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


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