ILIAS  release_8 Revision v8.19
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

 __construct (ilPageObject $a_pg_obj, ?ilPageContent $a_content_obj, string $a_hier_id="", string $a_pc_id="0")
 
 setContentObject (ilPageContent $a_val)
 
 getContentObject ()
 
 setPage (ilPageObject $a_val)
 
 getPage ()
 
 setPageConfig (ilPageConfig $a_val)
 
 getPageConfig ()
 
 setStyleId (int $a_styleid)
 
 getStyleId ()
 
 getStyle ()
 
 getCharacteristicsOfCurrentStyle (array $a_type)
 Get characteristics of current style and call setCharacteristics, if style is given. More...
 
 setCharacteristics (array $a_chars)
 
 getCharacteristics ()
 
 getHierId ()
 
 setHierId (string $a_hier_id)
 set hierarchical id in dom object More...
 
 delete ()
 
 moveAfter ()
 move content element after another element More...
 
 moveBefore ()
 move content element before another element More...
 
 splitPage ()
 split page to new page at specified position More...
 
 splitPageNext ()
 split page to next page at specified position More...
 
 displayValidationError ()
 
 cancelCreate ()
 cancel creating page content More...
 
 cancelUpdate ()
 cancel update More...
 
 cancel ()
 Cancel. More...
 
 deactivate ()
 gui function set enabled if is not enabled and vice versa More...
 
 cut ()
 Cut single element. More...
 
 copy ()
 Copy single element. More...
 
 getTemplateOptions (string $a_type="")
 Get table templates. More...
 

Static Public Member Functions

static _getCommonBBButtons ()
 

Data Fields

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

Static Public Attributes

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

Protected Member Functions

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

Protected Attributes

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

Static Protected Attributes

static array $common_bb_buttons
 

Detailed Description

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

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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

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

Member Function Documentation

◆ _getCommonBBButtons()

static ilPageContentGUI::_getCommonBBButtons ( )
static

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

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

132  : array
133  {
134  return self::$common_bb_buttons;
135  }
+ Here is the caller graph for this function:

◆ cancel()

ilPageContentGUI::cancel ( )

Cancel.

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

References ILIAS\Repository\ctrl().

436  : void
437  {
438  $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
439  }
+ Here is the call graph for this function:

◆ cancelCreate()

ilPageContentGUI::cancelCreate ( )

cancel creating page content

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

References ILIAS\Repository\ctrl().

420  : void
421  {
422  $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
423  }
+ Here is the call graph for this function:

◆ cancelUpdate()

ilPageContentGUI::cancelUpdate ( )

cancel update

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

References ILIAS\Repository\ctrl().

428  : void
429  {
430  $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
431  }
+ Here is the call graph for this function:

◆ copy()

ilPageContentGUI::copy ( )

Copy single element.

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

References ILIAS\Repository\ctrl().

476  : void
477  {
478  $this->pg_obj->copyContents(array($this->hier_id . ":" . $this->pc_id));
479  $this->ctrl->returnToParent($this, "jump" . $this->hier_id);
480  }
+ Here is the call graph for this function:

◆ cut()

ilPageContentGUI::cut ( )

Cut single element.

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

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

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

◆ deactivate()

ilPageContentGUI::deactivate ( )

gui function set enabled if is not enabled and vice versa

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

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

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

◆ delete()

ilPageContentGUI::delete ( )

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

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

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

◆ displayValidationError()

ilPageContentGUI::displayValidationError ( )

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

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

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

◆ getCharacteristics()

◆ getCharacteristicsOfCurrentStyle()

ilPageContentGUI::getCharacteristicsOfCurrentStyle ( array  $a_type)

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

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

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

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

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

◆ getContentObject()

ilPageContentGUI::getContentObject ( )

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

References $content_obj.

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

◆ getCurrentTextLang()

ilPageContentGUI::getCurrentTextLang ( )
protected

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

Referenced by ilPCFileListGUI\initEditForm(), ilPCTableGUI\initPropertiesForm(), and ilPCSourceCodeGUI\insert().

537  : string
538  {
539  return $this->edit_repo->getTextLang($this->requested_ref_id);
540  }
+ Here is the caller graph for this function:

◆ getHierId()

◆ getPage()

ilPageContentGUI::getPage ( )

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

References $pg_obj.

Referenced by ilPCLoginPageElementGUI\__construct(), ilPCQuestionGUI\copyQuestion(), ilPCListGUI\create(), ilPCPlaceHolderGUI\create(), ilPCContentTemplateGUI\create(), ilPCQuestionOverviewGUI\create(), ilPCMyCoursesGUI\create(), ilPCLoginPageElementGUI\create(), ilPCBlogGUI\create(), ilPCAMDPageListGUI\create(), ilPCAMDFormGUI\create(), ilPCSkillsGUI\create(), ilPCGridGUI\create(), ilPCContentIncludeGUI\create(), ilPCLearningHistoryGUI\create(), ilPCConsultationHoursGUI\create(), ilPCMapGUI\create(), ilPCResourcesGUI\create(), ilPCProfileGUI\create(), ilPCSourceCodeGUI\create(), ilPCVerificationGUI\create(), ilPCQuestionGUI\create(), ilPCFileListGUI\create(), ilPCInteractiveImageGUI\create(), ilPCTabsGUI\create(), ilPCSectionGUI\create(), ilPCMediaObjectGUI\create(), ilPCParagraphGUI\create(), ilPCPluggedGUI\createElement(), ilPCLauncherGUI\createNewPageContent(), ilPCCurriculumGUI\createNewPageContent(), ilPCPluggedGUI\edit(), ilPCPluggedGUI\executeCommand(), ilPCAMDFormGUI\getAdvRecords(), ilPCTableGUI\getCellContent(), ilPCDataTableGUI\getNewTableObject(), ilPCTableGUI\getNewTableObject(), ilPCAMDFormGUI\getPortfolioForm(), ilPCTableGUI\getPropertiesFormValues(), ilPCContentTemplateGUI\initForm(), ilPCAMDPageListGUI\initForm(), ilPCPlaceHolderGUI\insertPCText(), and ilPCAMDFormGUI\isTemplate().

117  : ilPageObject
118  {
119  return $this->pg_obj;
120  }
Class ilPageObject Handles PageObjects of ILIAS Learning Modules (see ILIAS DTD)
+ Here is the caller graph for this function:

◆ getPageConfig()

ilPageContentGUI::getPageConfig ( )

◆ getParentReturn()

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

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

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

511  : string
512  {
513  if ($hier_id == "") {
515  }
516  $ilCtrl = $this->ctrl;
517  $pcid = $this->pg_obj->getPCIdForHierId($hier_id);
518  return $ilCtrl->getParentReturn($this) . "#add" . $pcid;
519  }
getParentReturn(object $a_gui_obj)
+ Here is the call graph for this function:

◆ getStyle()

ilPageContentGUI::getStyle ( )

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

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

Referenced by getTemplateOptions().

147  : ?ilObjStyleSheet
148  {
149  if ((!is_object($this->style) || $this->getStyleId() != $this->style->getId()) && $this->getStyleId() > 0) {
150  if (ilObject::_lookupType($this->getStyleId()) == "sty") {
151  $this->style = new ilObjStyleSheet($this->getStyleId());
152  }
153  }
154  return $this->style;
155  }
static _lookupType(int $id, bool $reference=false)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStyleId()

ilPageContentGUI::getStyleId ( )

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

References $styleid.

Referenced by ilPCTableGUI\getCellContent(), getCharacteristicsOfCurrentStyle(), ilPCTabsGUI\getFormValues(), ilPCTableGUI\getPropertiesFormValues(), and getStyle().

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

◆ getTemplateOptions()

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

Get table templates.

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

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

Referenced by ilPCTabsGUI\initForm().

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

Exceptions
ilCOPagePCEditException

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

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

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

◆ moveBefore()

ilPageContentGUI::moveBefore ( )

move content element before another element

Exceptions
ilCOPagePCEditException

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

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

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

◆ redirectToParent()

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

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

References $ctrl, and $hier_id.

Referenced by ilPCMediaObjectGUI\create(), and updateAndReturn().

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

◆ setCharacteristics()

ilPageContentGUI::setCharacteristics ( array  $a_chars)

◆ setContentObject()

ilPageContentGUI::setContentObject ( ilPageContent  $a_val)

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

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

◆ setCurrentTextLang()

ilPageContentGUI::setCurrentTextLang ( string  $lang_key)
protected

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

Referenced by ilPCSourceCodeGUI\create(), ilPCFileListGUI\create(), and ilPCParagraphGUI\create().

532  : void
533  {
534  $this->edit_repo->setTextLang($this->requested_ref_id, $lang_key);
535  }
+ Here is the caller graph for this function:

◆ setHierId()

ilPageContentGUI::setHierId ( string  $a_hier_id)

set hierarchical id in dom object

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

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

221  : void
222  {
223  $this->hier_id = $a_hier_id;
224  }
+ Here is the caller graph for this function:

◆ setPage()

ilPageContentGUI::setPage ( ilPageObject  $a_val)

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

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

◆ setPageConfig()

ilPageContentGUI::setPageConfig ( ilPageConfig  $a_val)

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

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

◆ setStyleId()

ilPageContentGUI::setStyleId ( int  $a_styleid)

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

Referenced by ilPCSectionEditorGUI\getCreationForm(), ilPCSectionEditorGUI\getEditComponentForm(), and ilPCMediaObjectEditorGUI\getEditorElements().

137  : void
138  {
139  $this->styleid = $a_styleid;
140  }
+ Here is the caller graph for this function:

◆ splitPage()

ilPageContentGUI::splitPage ( )

split page to new page at specified position

Exceptions
ilCOPagePCEditException

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

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

355  : void
356  {
357  if ($this->pg_obj->getParentType() != "lm") {
358  throw new ilCOPagePCEditException("Split method called for wrong parent type (" .
359  $this->pg_obj->getParentType() . ")");
360  } else {
361  $lm_page = ilLMPageObject::_splitPage(
362  $this->pg_obj->getId(),
363  $this->pg_obj->getParentType(),
365  );
366 
367  // jump to new page
368  $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $lm_page->getId());
369  $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
370  }
371 
372  $this->ctrl->returnToParent($this, "jump" . ($this->hier_id - 1));
373  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _splitPage(int $a_page_id, string $a_pg_parent_type, string $a_hier_id)
split page at hierarchical id the main reason for this method being static is that a lm page object i...
+ Here is the call graph for this function:

◆ splitPageNext()

ilPageContentGUI::splitPageNext ( )

split page to next page at specified position

Exceptions
ilCOPagePCEditException

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

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

379  : void
380  {
381  if ($this->pg_obj->getParentType() != "lm") {
382  throw new ilCOPagePCEditException("Split method called for wrong parent type (" .
383  $this->pg_obj->getParentType() . ")");
384  } else {
386  $this->pg_obj->getId(),
387  $this->pg_obj->getParentType(),
389  );
390 
391  // jump to successor page
392  if ($succ_id > 0) {
393  $this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $succ_id);
394  $this->ctrl->redirectByClass("illmpageobjectgui", "edit");
395  }
396  }
397  $this->ctrl->returnToParent($this, "jump" . ($this->hier_id - 1));
398  }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _splitPageNext(int $a_page_id, string $a_pg_parent_type, string $a_hier_id)
split page to next page at hierarchical id
+ Here is the call graph for this function:

◆ updateAndReturn()

ilPageContentGUI::updateAndReturn ( )
protected

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

References redirectToParent().

Referenced by ilPCInteractiveImageGUI\centerAlign(), ilPCTableGUI\centerAlign(), ilPCMediaObjectGUI\centerAlign(), deactivate(), ilPCGridCellGUI\deleteCell(), ilPCTableDataGUI\deleteCol(), ilPCListItemGUI\deleteItem(), ilPCFileItemGUI\deleteItem(), ilPCTableDataGUI\deleteRow(), ilPCInteractiveImageGUI\leftAlign(), ilPCTableGUI\leftAlign(), ilPCMediaObjectGUI\leftAlign(), ilPCInteractiveImageGUI\leftFloatAlign(), ilPCTableGUI\leftFloatAlign(), ilPCMediaObjectGUI\leftFloatAlign(), ilPCGridCellGUI\moveCellLeft(), ilPCGridCellGUI\moveCellRight(), ilPCTableDataGUI\moveColLeft(), ilPCTableDataGUI\moveColRight(), ilPCListItemGUI\moveItemDown(), ilPCFileItemGUI\moveItemDown(), ilPCListItemGUI\moveItemUp(), ilPCFileItemGUI\moveItemUp(), ilPCTableDataGUI\moveRowDown(), ilPCTableDataGUI\moveRowUp(), ilPCTableDataGUI\newColAfter(), ilPCTableDataGUI\newColBefore(), ilPCListItemGUI\newItemAfter(), ilPCListItemGUI\newItemBefore(), ilPCTableDataGUI\newRowAfter(), ilPCTableDataGUI\newRowBefore(), ilPCInteractiveImageGUI\rightAlign(), ilPCTableGUI\rightAlign(), ilPCMediaObjectGUI\rightAlign(), ilPCInteractiveImageGUI\rightFloatAlign(), ilPCTableGUI\rightFloatAlign(), and ilPCMediaObjectGUI\rightFloatAlign().

521  : void
522  {
523  $up = $this->pg_obj->update();
524  if ($up === true) {
525  $this->edit_repo->clearPageError();
526  } else {
527  $this->edit_repo->setPageError($this->pg_obj->update());
528  }
529  $this->redirectToParent();
530  }
redirectToParent(string $hier_id="")
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $char_manager

Style Content CharacteristicManager ilPageContentGUI::$char_manager
protected

◆ $chars

◆ $common_bb_buttons

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

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

◆ $content_obj

◆ $ctrl

ilCtrl ilPageContentGUI::$ctrl

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

Referenced by ilPCFileListGUI\addFileItem(), ilPCInteractiveImageGUI\addPopup(), ilPCTabsGUI\addTab(), ilPCDataTableGUI\afterCreation(), ilPCTabsGUI\afterCreation(), ilPCTabsGUI\cancelTabDeletion(), ilPCMediaObjectGUI\changeObjectReference(), ilPCInteractiveImageGUI\confirmDeleteOverlays(), ilPCInteractiveImageGUI\confirmPopupDeletion(), ilPCTabsGUI\confirmTabsDeletion(), ilPCQuestionGUI\copyQuestion(), ilPCInteractiveImageGUI\create(), ilPCMediaObjectGUI\create(), ilPCGridGUI\deleteCells(), ilPCFileListGUI\deleteFileItem(), ilPCInteractiveImageGUI\deleteOverlays(), ilPCInteractiveImageGUI\deletePopups(), ilPCTabsGUI\deleteTabs(), ilPCQuestionOverviewGUI\edit(), ilPCResourcesGUI\edit(), ilPCLoginPageElementGUI\edit(), ilPCPluggedGUI\edit(), ilPCInteractiveImageGUI\edit(), ilPCQuestionGUI\edit(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCMediaObjectGUI\editStyle(), ilPCQuestionGUI\executeCommand(), ilPCPluggedGUI\executeCommand(), ilPCQuestionGUI\feedback(), ilPCTableGUI\getEditDataTable(), getParentReturn(), ilPCAMDFormGUI\getPortfolioForm(), ilPCInteractiveImageGUI\getTabs(), ilPCMediaObjectGUI\getTabs(), ilPCAMDFormGUI\getTemplateForm(), ilPCFileItemGUI\initAddFileForm(), ilPCInteractiveImageGUI\initAddOverlaysForm(), ilPCMediaObjectGUI\initAliasForm(), ilPCFileListGUI\initEditForm(), ilPCContentTemplateGUI\initForm(), ilPCAMDPageListGUI\initForm(), ilPCMyCoursesGUI\initForm(), ilPCLearningHistoryGUI\initForm(), ilPCMapGUI\initForm(), ilPCConsultationHoursGUI\initForm(), ilPCProfileGUI\initForm(), ilPCBlogGUI\initForm(), ilPCTabsGUI\initForm(), ilPCSkillsGUI\initForm(), ilPCInteractiveImageGUI\initForm(), ilPCSectionGUI\initForm(), ilPCBlogGUI\initPostingForm(), ilPCTableGUI\initPropertiesForm(), ilPCQuestionGUI\insert(), ilPCInteractiveImageGUI\insert(), ilPCMediaObjectGUI\insert(), ilPCContentIncludeGUI\insertFromPool(), ilPCMediaObjectGUI\insertFromPool(), ilPCFileListGUI\insertFromRepository(), ilPCFileItemGUI\insertFromRepository(), ilPCFileListGUI\insertFromWorkspace(), ilPCFileItemGUI\insertFromWorkspace(), ilPCInteractiveImageGUI\listOverlayImages(), ilPCQuestionGUI\listPoolQuestions(), ilPCContentIncludeGUI\poolSelection(), ilPCQuestionGUI\poolSelection(), ilPCMediaObjectGUI\poolSelection(), redirectToParent(), ilPCInteractiveImageGUI\savePopups(), ilPCFileListGUI\savePositions(), ilPCFileListGUI\savePositionsAndClasses(), ilPCFileListGUI\saveProperties(), ilPCTabsGUI\saveTabs(), ilPCMediaObjectGUI\selectObjectReference(), ilPCContentIncludeGUI\selectPool(), ilPCMediaObjectGUI\selectPool(), ilPCQuestionGUI\selectPool(), ilPCTableGUI\setCellPropertiesSubTabs(), ilPCQuestionGUI\setInsertTabs(), ilPCFileListGUI\setItemTabs(), ilPCTableGUI\setTabs(), ilPCFileItemGUI\setTabs(), ilPCQuestionGUI\setTabs(), ilPCFileListGUI\setTabs(), ilPCTabsGUI\setTabs(), ilPCDataTableGUI\tableAction(), ilPCInteractiveImageGUI\update(), ilPCTabsGUI\update(), ilPCDataTableGUI\updateJS(), and ilPCInteractiveImageGUI\uploadOverlayImages().

◆ $dom

php4DOMDocument ilPageContentGUI::$dom

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

◆ $edit_repo

EditSessionRepository ilPageContentGUI::$edit_repo
protected

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

◆ $hier_id

string ilPageContentGUI::$hier_id = ""

◆ $lng

ilLanguage ilPageContentGUI::$lng

Definition at line 37 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(), ilPCAMDFormGUI\create(), ilPCInteractiveImageGUI\create(), ilPCTabsGUI\create(), ilPCMediaObjectGUI\create(), ilPCFileListGUI\createFileItem(), ilPCInteractiveImageGUI\deleteOverlays(), ilPCInteractiveImageGUI\deletePopups(), ilPCQuestionOverviewGUI\edit(), ilPCResourcesGUI\edit(), ilPCLoginPageElementGUI\edit(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCMediaObjectGUI\editStyle(), ilPCPluggedGUI\executeCommand(), ilPCMediaObjectGUI\getAliasValues(), ilPCParagraphGUI\getCharStyleSelector(), ilPCMediaObjectGUI\getEnabledMapAreas(), ilPCLearningHistoryGUI\getPlaceholderPresentation(), ilPCAMDFormGUI\getPortfolioForm(), ilPCInteractiveImageGUI\getTabs(), ilPCMediaObjectGUI\getTabs(), ilPCPlaceHolderGUI\getTypeCaptions(), ilPCFileItemGUI\initAddFileForm(), ilPCInteractiveImageGUI\initAddOverlaysForm(), ilPCMediaObjectGUI\initAliasForm(), ilPCGridGUI\initCreationForm(), ilPCFileListGUI\initEditForm(), ilPCContentTemplateGUI\initForm(), ilPCMapGUI\initForm(), ilPCLearningHistoryGUI\initForm(), ilPCTabsGUI\initForm(), ilPCInteractiveImageGUI\initForm(), ilPCSectionGUI\initForm(), ilPCListGUI\initListForm(), ilPCTableGUI\initPropertiesForm(), ilPCQuestionGUI\insert(), ilPCInteractiveImageGUI\insert(), ilPCMediaObjectGUI\insert(), ilPCContentIncludeGUI\insertFromPool(), ilPCMediaObjectGUI\insertFromPool(), ilPCParagraphGUI\insertHelp(), ilPCResourcesGUI\insertResourcesIntoPageContent(), ilPCInteractiveImageGUI\listOverlayImages(), ilPCQuestionGUI\listPoolQuestions(), ilPCFileItemGUI\newFileItem(), ilPCPlaceHolderGUI\propertyGUI(), ilPCInteractiveImageGUI\savePopups(), ilPCFileListGUI\saveProperties(), ilPCTabsGUI\saveTabs(), ilPCMediaObjectGUI\selectObjectReference(), ilPCTableGUI\setAlignment(), ilPCQuestionGUI\setInsertTabs(), ilPCTableGUI\setSpans(), ilPCTableGUI\setStyles(), ilPCTableGUI\setTabs(), ilPCFileListGUI\setTabs(), ilPCTabsGUI\setTabs(), ilPCTableGUI\setWidths(), ilPCPlaceHolderGUI\textCOSelectionGUI(), ilPCDataTableGUI\update(), ilPCAMDFormGUI\update(), ilPCInteractiveImageGUI\update(), ilPCTabsGUI\update(), ilPCAMDFormGUI\updateAdvancedMetaData(), ilPCDataTableGUI\updateJS(), and ilPCInteractiveImageGUI\uploadOverlayImages().

◆ $log

ilLogger ilPageContentGUI::$log
protected

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

◆ $page_config

ilPageConfig ilPageContentGUI::$page_config = null

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

Referenced by getPageConfig().

◆ $pc_id

string ilPageContentGUI::$pc_id = ""
protected

◆ $pg_obj

ilPageObject ilPageContentGUI::$pg_obj

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

Referenced by getPage().

◆ $request

◆ $requested_ref_id

int ilPageContentGUI::$requested_ref_id = 0
protected

◆ $return_location

string ilPageContentGUI::$return_location = ""

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

◆ $style

◆ $style_selector_reset

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

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

◆ $styleid

int ilPageContentGUI::$styleid = 0
protected

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

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

◆ $sub_command

◆ $target_script

string ilPageContentGUI::$target_script = ""

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

◆ $tpl

ilGlobalTemplateInterface ilPageContentGUI::$tpl

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

Referenced by ilPCInteractiveImageGUI\__construct(), ilPCInteractiveImageGUI\addOverlayImages(), ilPCInteractiveImageGUI\confirmDeleteOverlays(), ilPCInteractiveImageGUI\confirmPopupDeletion(), ilPCTabsGUI\confirmTabsDeletion(), ilPCListGUI\create(), ilPCContentTemplateGUI\create(), ilPCAMDFormGUI\create(), ilPCMapGUI\create(), ilPCInteractiveImageGUI\create(), ilPCInteractiveImageGUI\deleteOverlays(), ilPCQuestionOverviewGUI\edit(), ilPCMapGUI\edit(), ilPCResourcesGUI\edit(), ilPCAMDPageListGUI\edit(), ilPCLoginPageElementGUI\edit(), ilPCMyCoursesGUI\edit(), ilPCLearningHistoryGUI\edit(), ilPCConsultationHoursGUI\edit(), ilPCProfileGUI\edit(), ilPCSkillsGUI\edit(), ilPCBlogGUI\edit(), ilPCPluggedGUI\edit(), ilPCSectionGUI\edit(), ilPCMediaObjectGUI\editAlias(), ilPCInteractiveImageGUI\editBaseImage(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellSpan(), ilPCTableGUI\editCellStyle(), ilPCTableGUI\editCellWidth(), ilPCAMDFormGUI\editPortfolio(), ilPCBlogGUI\editPosting(), ilPCTabsGUI\editProperties(), ilPCTableGUI\editProperties(), ilPCMediaObjectGUI\editStyle(), ilPCAMDFormGUI\editTemplate(), ilPCMediaObjectGUI\getEnabledMapAreas(), ilPCMyCoursesGUI\insert(), ilPCAMDPageListGUI\insert(), ilPCMapGUI\insert(), ilPCSkillsGUI\insert(), ilPCConsultationHoursGUI\insert(), ilPCProfileGUI\insert(), ilPCLearningHistoryGUI\insert(), ilPCContentTemplateGUI\insert(), ilPCTabsGUI\insert(), ilPCBlogGUI\insert(), ilPCAMDFormGUI\insert(), ilPCInteractiveImageGUI\insert(), ilPCMediaObjectGUI\insert(), ilPCTableGUI\insert(), ilPCContentIncludeGUI\insertFromPool(), ilPCMediaObjectGUI\insertFromPool(), ilPCFileListGUI\insertFromRepository(), ilPCFileItemGUI\insertFromRepository(), ilPCFileListGUI\insertFromWorkspace(), ilPCFileItemGUI\insertFromWorkspace(), ilPCBlogGUI\insertPosting(), ilPCResourcesGUI\insertResourcesIntoPageContent(), ilPCInteractiveImageGUI\listOverlayImages(), ilPCQuestionGUI\listPoolQuestions(), ilPCContentIncludeGUI\poolSelection(), ilPCQuestionGUI\poolSelection(), ilPCMediaObjectGUI\poolSelection(), ilPCListGUI\saveProperties(), ilPCFileListGUI\saveProperties(), ilPCMapGUI\update(), ilPCAMDFormGUI\update(), and ilPCTabsGUI\update().

◆ $updated

ilPageContentGUI::$updated

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

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


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