ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilLMPageObjectGUI Class Reference

Class ilLMPageObjectGUI. More...

+ Inheritance diagram for ilLMPageObjectGUI:
+ Collaboration diagram for ilLMPageObjectGUI:

Public Member Functions

 ilLMPageObjectGUI (&$a_content_obj)
 Constructor. More...
 
 setLMPageObject ($a_pg_obj)
 Set content object dependent page object (co page) More...
 
executeCommand ()
 execute command More...
 
 edit ()
 
 preview ()
 
 save ()
 save co page object More...
 
 cancel ()
 cancel More...
 
 getLinkXML ($a_int_links)
 get link targets More...
 
 updateHistory ()
 update history More...
 
 _goto ($a_target)
 redirect script More...
 
 editLayout ()
 Edit layout of page. More...
 
 initEditLayoutForm ()
 Init edit layout form. More...
 
 saveLayout ()
 Save layout. More...
 
 addPageTabs ()
 Add page tabs. More...
 
- Public Member Functions inherited from ilLMObjectGUI
 ilLMObjectGUI (&$a_content_obj)
 constructor More...
 
 setActions ($a_actions="")
 build action array More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 create ()
 structure / page object creation form More...
 
 putInTree ()
 put this object into content object tree More...
 
 delete ()
 Confirm deletion screen (delete page or structure objects) More...
 
 cancelDelete ()
 cancel deletion of page/structure objects More...
 
 confirmedDelete ()
 page and structure object deletion More...
 
 add_cell ($val, $link="")
 output a cell in object list More...
 
 showActions ($a_actions)
 show possible action (form buttons) More...
 
 checkTree ()
 check the content object tree More...
 

Data Fields

 $obj
 
- Data Fields inherited from ilLMObjectGUI
 $ilias
 
 $tpl
 
 $lng
 
 $obj
 
 $ctrl
 
 $content_object
 
 $actions
 

Detailed Description

Class ilLMPageObjectGUI.

User Interface for Learning Module Page Objects Editing

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

ilLMPageObjectGUI: ilLMPageGUI, ilAssGenFeedbackPageGUI

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

Member Function Documentation

◆ _goto()

ilLMPageObjectGUI::_goto (   $a_target)

redirect script

Parameters
string$a_target

Definition at line 341 of file class.ilLMPageObjectGUI.php.

References $_GET, $ilErr, ilLMObjectGUI\$lng, $ref_id, ilObject\_getAllReferences(), ilObjectGUI\_gotoRepositoryRoot(), ilLMObject\_lookupContObjID(), ilObject\_lookupTitle(), exit, and ilUtil\sendFailure().

342  {
343  global $rbacsystem, $ilErr, $lng, $ilAccess;
344 
345  $first = strpos($a_target, "_");
346  $second = strpos($a_target, "_", $first + 1);
347  $page_id = substr($a_target, 0, $first);
348  if ($first > 0)
349  {
350  $page_id = substr($a_target, 0, $first);
351  if ($second > 0)
352  {
353  $ref_id = substr($a_target, $first + 1, $second - ($first + 1));
354  $anchor = substr($a_target, $second + 1);
355  }
356  else
357  {
358  $ref_id = substr($a_target, $first + 1);
359  }
360  }
361  else
362  {
363  $page_id = $a_target;
364  }
365 
366  // determine learning object
367  $lm_id = ilLMObject::_lookupContObjID($page_id);
368 
369  // get all references
370  $ref_ids = ilObject::_getAllReferences($lm_id);
371 
372  // always try passed ref id first
373  if (in_array($ref_id, $ref_ids))
374  {
375  $ref_ids = array_merge(array($ref_id), $ref_ids);
376  }
377 
378  // check read permissions
379  foreach ($ref_ids as $ref_id)
380  {
381  // check read permissions
382  if ($ilAccess->checkAccess("read", "", $ref_id))
383  {
384  // don't redirect anymore, just set parameters
385  // (goto.php includes "ilias.php")
386  $_GET["baseClass"] = "ilLMPresentationGUI";
387  $_GET["obj_id"] = $page_id;
388  $_GET["ref_id"] = $ref_id;
389  $_GET["anchor"] = $anchor;
390  include_once("ilias.php");
391  exit;
392  }
393  }
394 
395  if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
396  {
397  if ($lm_id > 0)
398  {
399  ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
400  ilObject::_lookupTitle($lm_id)), true);
401  }
402  else
403  {
404  $lng->loadLanguageModule("content");
405  ilUtil::sendFailure($lng->txt("page_does_not_exist"), true);
406  }
407  include_once("./Services/Object/classes/class.ilObjectGUI.php");
409  }
410 
411  $ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
412  }
exit
Definition: login.php:54
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupTitle($a_id)
lookup object title
static _getAllReferences($a_id)
get all reference ids of object
_lookupContObjID($a_id)
get learning module / digibook id for lm object
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
$ref_id
Definition: sahs_server.php:39
+ Here is the call graph for this function:

◆ addPageTabs()

ilLMPageObjectGUI::addPageTabs ( )

Add page tabs.

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

References $ilCtrl.

506  {
507  global $ilTabs, $ilCtrl;
508 
509  $ilTabs->addTarget("cont_layout",
510  $ilCtrl->getLinkTarget($this, 'editLayout'), "editLayout");
511  }
global $ilCtrl
Definition: ilias.php:18

◆ cancel()

ilLMPageObjectGUI::cancel ( )

cancel

Definition at line 213 of file class.ilLMPageObjectGUI.php.

References $_GET, and ilUtil\redirect().

214  {
215  if ($_GET["obj_id"] != 0)
216  {
217  ilUtil::redirect($this->ctrl->getLinkTargetByClass("ilStructureObjectGUI",
218  "view", "", true));
219  }
220  $up_gui = ($this->content_object->getType() == "dbk")
221  ? "ilobjdlbookgui"
222  : "ilobjlearningmodulegui";
223  $this->ctrl->redirectByClass($up_gui, "pages");
224  }
$_GET["client_id"]
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ edit()

ilLMPageObjectGUI::edit ( )

Definition at line 159 of file class.ilLMPageObjectGUI.php.

References executeCommand().

160  {
161 //echo "<br>umschuss";
162  $this->ctrl->setCmdClass("ilLMPageGUI");
163  $this->ctrl->setCmd("edit");
164  $this->executeCommand();
165  //$this->setTabs();
166  }
& executeCommand()
execute command
+ Here is the call graph for this function:

◆ editLayout()

ilLMPageObjectGUI::editLayout ( )

Edit layout of page.

Definition at line 417 of file class.ilLMPageObjectGUI.php.

References $ilCtrl, $lm_set, $obj, ilLMObjectGUI\$tpl, ilUtil\getImagePath(), initEditLayoutForm(), and ilPageObjectGUI\setEditPreview().

418  {
419  global $tpl, $ilCtrl, $ilTabs;
420 
421  $page_gui = new ilLMPageGUI($this->obj->getId());
422  $page_gui->setEditPreview(true);
423  $page_gui->activateMetaDataEditor($this->content_object->getID(),
424  $this->obj->getId(), $this->obj->getType(),
425  $this->obj, "MDUpdateListener");
426  $page_gui->setActivationListener($this, "activatePage");
427  $page_gui->setTabHook($this, "addPageTabs");
428  $lm_set = new ilSetting("lm");
429  $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg_b.png"));
430  $tpl->setTitle($this->lng->txt("page").": ".$this->obj->getTitle());
431  $ilCtrl->getHTML($page_gui);
432  $ilTabs->setTabActive("cont_layout");
433  $this->initEditLayoutForm();
434  $tpl->setContent($this->form->getHTML());
435  }
ILIAS Setting Class.
setEditPreview($a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
global $ilCtrl
Definition: ilias.php:18
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Extension of ilPageObjectGUI for learning modules.
$lm_set
initEditLayoutForm()
Init edit layout form.
+ Here is the call graph for this function:

◆ executeCommand()

& ilLMPageObjectGUI::executeCommand ( )

execute command

Definition at line 52 of file class.ilLMPageObjectGUI.php.

References $_GET, $cmd, $ilCtrl, $ilSetting, $lm_set, $obj, $ret, ilLMObjectGUI\$tpl, ilPageObject\_exists(), ilFrameTargetInfo\_getFrame(), ilLMPageObject\_getPresentationTitle(), ilObjStyleSheet\getEffectiveContentStyleId(), ilUtil\getImagePath(), getLinkXML(), and ilPageObjectGUI\setEditPreview().

Referenced by edit(), and preview().

53  {
54  global $tpl, $ilCtrl, $ilTabs, $ilSetting;
55 
56  $next_class = $this->ctrl->getNextClass($this);
57  $cmd = $this->ctrl->getCmd();
58 
59 //echo "<br>:cmd:".$this->ctrl->getCmd().":cmdClass:".$this->ctrl->getCmdClass().":".
60 // ":nextClass:".$next_class.":"; flush();
61 
62  switch($next_class)
63  {
64  case "illmpagegui":
65 
66  // Determine whether the view of a learning resource should
67  // be shown in the frameset of ilias, or in a separate window.
68  //$showViewInFrameset = $this->ilias->ini->readVariable("layout","view_target") == "frame";
69  $showViewInFrameset = true;
70  $lm_set = new ilSetting("lm");
71 
72  $this->ctrl->setReturn($this, "edit");
73  if (!ilPageObject::_exists("lm", $this->obj->getId(), $_GET["transl"]) &&
74  ilPageObject::_exists("lm", $this->obj->getId(), "-"))
75  {
76  if ($_GET["totransl"] == "")
77  {
78  $_GET["totransl"] = $_GET["transl"];
79  $ilCtrl->setCmd("switchToLanguage");
80  }
81  $ilCtrl->setCmdClass("illmpagegui");
82  $page_gui = new ilLMPageGUI($this->obj->getId(), 0, false, "-");
83  }
84  else
85  {
86  $page_gui = new ilLMPageGUI($this->obj->getId());
87  }
88  $page_gui->setEditPreview(true);
89  $page_gui->activateMetaDataEditor($this->content_object->getID(),
90  $this->obj->getId(), $this->obj->getType(),
91  $this->obj, "MDUpdateListener");
92  if ($ilSetting->get("block_activated_news"))
93  {
94  $page_gui->setEnabledNews(true, $this->obj->content_object->getId(),
95  $this->obj->content_object->getType());
96  }
97 
98  // set page view link
99  if ($showViewInFrameset)
100  {
101  $view_frame = ilFrameTargetInfo::_getFrame("MainContent");
102  }
103  else
104  {
105  $view_frame = "ilContObj".$this->content_object->getID();
106  }
107  $page_gui->setViewPageLink(ILIAS_HTTP_PATH."/goto.php?target=pg_".$this->obj->getId().
108  "_".$_GET["ref_id"],
109  $view_frame);
110 
111  include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
112  $page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
113  $this->content_object->getStyleSheetId(), "lm"));
114  $page_gui->setTemplateTargetVar("ADM_CONTENT");
115  $page_gui->getPageObject()->buildDom();
116  $int_links = $page_gui->getPageObject()->getInternalLinks();
117  $link_xml = $this->getLinkXML($int_links);
118  $page_gui->setLinkXML($link_xml);
119 
120  $page_gui->enableChangeComments($this->content_object->isActiveHistoryUserComments());
121  $page_gui->setFileDownloadLink("ilias.php?cmd=downloadFile&ref_id=".$_GET["ref_id"]."&baseClass=ilLMPresentationGUI");
122  $page_gui->setFullscreenLink("ilias.php?cmd=fullscreen&ref_id=".$_GET["ref_id"]."&baseClass=ilLMPresentationGUI");
123  $page_gui->setLinkParams("ref_id=".$this->content_object->getRefId());
124  $page_gui->setSourcecodeDownloadScript("ilias.php?ref_id=".$_GET["ref_id"]."&baseClass=ilLMPresentationGUI");
125  $page_gui->setPresentationTitle(
126  ilLMPageObject::_getPresentationTitle($this->obj->getId(),
127  $this->content_object->getPageHeader(), $this->content_object->isActiveNumbering()));
128  $page_gui->setLocator($contObjLocator);
129  $page_gui->setHeader($this->lng->txt("page").": ".$this->obj->getTitle());
130  $page_gui->setActivationListener($this, "activatePage");
131 
132  $up_gui = ($this->content_object->getType() == "dbk")
133  ? "ilobjdlbookgui"
134  : "ilobjlearningmodulegui";
135  $ilCtrl->setParameterByClass($up_gui, "active_node", $this->obj->getId());
136  $page_gui->setExplorerUpdater("tree", "tree_div",
137  $ilCtrl->getLinkTargetByClass($up_gui, "explorer", "", true));
138 
139  $tpl->setTitleIcon(ilUtil::getImagePath("icon_pg_b.png"));
140  $tpl->setTitle($this->lng->txt("page").": ".$this->obj->getTitle());
141  if ($this->content_object->getLayoutPerPage())
142  {
143  $page_gui->setTabHook($this, "addPageTabs");
144  }
145  $ret = $this->ctrl->forwardCommand($page_gui);
146  $tpl->setContent($ret);
147  break;
148 
149  default:
150  $ret =& $this->$cmd();
151  break;
152  }
153  }
ILIAS Setting Class.
setEditPreview($a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
$_GET["client_id"]
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
Extension of ilPageObjectGUI for learning modules.
static getEffectiveContentStyleId($a_style_id, $a_type="")
Get effective Style Id.
static _getFrame($a_class, $a_type='')
Get content frame name.
$lm_set
global $ilSetting
Definition: privfeed.php:40
getLinkXML($a_int_links)
get link targets
static _getPresentationTitle($a_pg_id, $a_mode=IL_CHAPTER_TITLE, $a_include_numbers=false, $a_time_scheduled_activation=false, $a_force_content=false, $a_lm_id=0, $a_lang="-")
presentation title doesn&#39;t have to be page title, it may be chapter title + page title or chapter tit...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLinkXML()

ilLMPageObjectGUI::getLinkXML (   $a_int_links)

get link targets

Definition at line 229 of file class.ilLMPageObjectGUI.php.

References $_GET, ilLMObjectGUI\$content_object, $target_arr, $target_id, ilFrameTargetInfo\_getFrame(), ilLMObject\_lookupContObjID(), ilObject\_lookupObjId(), and ilObject\_lookupType().

Referenced by executeCommand().

230  {
231  if ($a_layoutframes == "")
232  {
233  $a_layoutframes = array();
234  }
235  $link_info = "<IntLinkInfos>";
236  foreach ($a_int_links as $int_link)
237  {
238  $target = $int_link["Target"];
239  if (substr($target, 0, 4) == "il__")
240  {
241  $target_arr = explode("_", $target);
242  $target_id = $target_arr[count($target_arr) - 1];
243  $type = $int_link["Type"];
244  $targetframe = ($int_link["TargetFrame"] != "")
245  ? $int_link["TargetFrame"]
246  : "None";
247 
248  // anchor
249  $anc = $anc_add = "";
250  if ($int_link["Anchor"] != "")
251  {
252  $anc = $int_link["Anchor"];
253  $anc_add = "_".rawurlencode($int_link["Anchor"]);
254  }
255 
256  switch($type)
257  {
258  case "PageObject":
259  case "StructureObject":
261  $cont_obj =& $this->content_object;
262  if ($lm_id == $cont_obj->getId())
263  {
264  $ltarget = "";
265  if ($type == "PageObject")
266  {
267  $this->ctrl->setParameter($this, "obj_id", $target_id);
268  $href = $this->ctrl->getLinkTargetByClass(get_class($this), "edit");
269  }
270  else
271  {
272  $this->ctrl->setParameterByClass("ilstructureobjectgui", "obj_id", $target_id);
273  $href = $this->ctrl->getLinkTargetByClass("ilstructureobjectgui", "view");
274  }
275  $href = str_replace("&", "&amp;", $href);
276  $this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
277  }
278  else
279  {
280  if ($type == "PageObject")
281  {
282  $href = "goto.php?target=pg_".$target_id.$anc_add;
283  }
284  else
285  {
286  $href = "goto.php?target=st_".$target_id;
287  }
288  $ltarget = "ilContObj".$lm_id;
289  }
290  break;
291 
292  case "GlossaryItem":
293  $ltarget = $nframe = "_blank";
294  $href = "ilias.php?cmdClass=illmpresentationgui&amp;baseClass=ilLMPresentationGUI&amp;".
295  "obj_type=$type&amp;cmd=glossary&amp;ref_id=".$_GET["ref_id"].
296  "&amp;obj_id=".$target_id."&amp;frame=$nframe";
297  break;
298 
299  case "MediaObject":
300  $ltarget = $nframe = "_blank";
301  $href = "ilias.php?cmdClass=illmpresentationgui&amp;baseClass=ilLMPresentationGUI&amp;obj_type=$type&amp;cmd=media&amp;ref_id=".$_GET["ref_id"].
302  "&amp;mob_id=".$target_id."&amp;frame=$nframe";
303  break;
304 
305  case "RepositoryItem":
306  $obj_type = ilObject::_lookupType($target_id, true);
308  $href = "./goto.php?target=".$obj_type."_".$target_id;
309  $t_frame = ilFrameTargetInfo::_getFrame("MainContent", $obj_type);
310  $ltarget = $t_frame;
311  break;
312  }
313 
314  $anc_par = 'Anchor="'.$anc.'"';
315 
316  $link_info.="<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
317  "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" $anc_par/>";
318  }
319  }
320  $link_info.= "</IntLinkInfos>";
321 //echo ":".htmlentities($link_info).":";
322  return $link_info;
323  }
$target_arr
Definition: goto.php:86
$_GET["client_id"]
$target_id
Definition: goto.php:88
static _lookupObjId($a_id)
_lookupContObjID($a_id)
get learning module / digibook id for lm object
static _lookupType($a_id, $a_reference=false)
lookup object type
static _getFrame($a_class, $a_type='')
Get content frame name.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ilLMPageObjectGUI()

ilLMPageObjectGUI::ilLMPageObjectGUI ( $a_content_obj)

Constructor.

Parameters
object$a_content_objcontent object (lm | dbk) public

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

References ilLMObjectGUI\$ilias, ilLMObjectGUI\$lng, and ilLMObjectGUI\$tpl.

32  {
33  global $ilias, $tpl, $lng;
34 
35  parent::ilLMObjectGUI($a_content_obj);
36 
37  }

◆ initEditLayoutForm()

ilLMPageObjectGUI::initEditLayoutForm ( )

Init edit layout form.

Parameters
int$a_modeEdit Mode

Definition at line 442 of file class.ilLMPageObjectGUI.php.

References $ilCtrl, ilLMObjectGUI\$lng, ilObjContentObject\getAvailableLayouts(), ilUtil\getImagePath(), and ilUtil\img().

Referenced by editLayout(), and saveLayout().

443  {
444  global $lng, $ilCtrl;
445 
446  include_once("Services/Form/classes/class.ilPropertyFormGUI.php");
447  $this->form = new ilPropertyFormGUI();
448 
449  // default layout
450  $layout = new ilRadioGroupInputGUI($lng->txt("cont_layout"), "layout");
451 
452  if (is_file($im = ilUtil::getImagePath("layout_".$this->content_object->getLayout().".png")))
453  {
454  $im_tag = ilUtil::img($im, $this->content_object->getLayout());
455  }
456  $layout->addOption(new ilRadioOption("<table><tr><td>".$im_tag."</td><td><b>".
457  $lng->txt("cont_lm_default_layout").
458  "</b>: ".$lng->txt("cont_layout_".$this->content_object->getLayout()).
459  "</td></tr></table>", ""));
460 
462  {
463  $im_tag = "";
464  if (is_file($im = ilUtil::getImagePath("layout_".$l.".png")))
465  {
466  $im_tag = ilUtil::img($im, $l);
467  }
468  $layout->addOption(new ilRadioOption("<table><tr><td>".$im_tag."</td><td><b>".
469  $lng->txt("cont_layout_".$l)."</b>: ".$lng->txt("cont_layout_".$l."_desc").
470  "</td></tr></table>", $l));
471  }
472 
473  $layout->setValue($this->obj->getLayout());
474  $this->form->addItem($layout);
475 
476  $this->form->addCommandButton("saveLayout", $lng->txt("save"));
477 
478  $this->form->setTitle($lng->txt("cont_page_layout"));
479  $this->form->setFormAction($ilCtrl->getFormAction($this));
480 
481  }
This class represents an option in a radio group.
This class represents a property form user interface.
static img($a_src, $a_alt="", $a_width="", $a_height="", $a_border=0, $a_id="")
Build img tag.
getAvailableLayouts()
get all available lm layouts
global $ilCtrl
Definition: ilias.php:18
This class represents a property in a property form.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ preview()

ilLMPageObjectGUI::preview ( )

Definition at line 171 of file class.ilLMPageObjectGUI.php.

References executeCommand().

172  {
173  $this->ctrl->setCmdClass("ilLMPageGUI");
174  $this->ctrl->setCmd("preview");
175  $this->executeCommand();
176 // $this->setTabs();
177  }
& executeCommand()
execute command
+ Here is the call graph for this function:

◆ save()

ilLMPageObjectGUI::save ( )

save co page object

Definition at line 182 of file class.ilLMPageObjectGUI.php.

References $_GET, $_POST, ilLMObjectGUI\checkTree(), ilLMObjectGUI\putInTree(), ilUtil\redirect(), and ilUtil\stripSlashes().

183  {
184  $this->obj =& new ilLMPageObject($this->content_object);
185  $this->obj->setType("pg");
186  $this->obj->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
187  $this->obj->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
188  $this->obj->setLMId($this->content_object->getId());
189  $this->obj->create();
190 
191  // obj_id is empty, if page is created from "all pages" screen
192  // -> a free page is created (not in the tree)
193 //echo "<br>savePage:".$_GET["obj_id"].":";
194  if ($_GET["obj_id"] != 0)
195  {
196  $this->putInTree();
197 
198  // check the tree
199  $this->checkTree();
200 
201  ilUtil::redirect($this->ctrl->getLinkTargetByClass("ilStructureObjectGUI",
202  "edit", "", true));
203  }
204  $up_gui = ($this->content_object->getType() == "dbk")
205  ? "ilobjdlbookgui"
206  : "ilobjlearningmodulegui";
207  $this->ctrl->redirectByClass($up_gui, "pages");
208  }
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
checkTree()
check the content object tree
Class ilLMPageObject.
putInTree()
put this object into content object tree
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

◆ saveLayout()

ilLMPageObjectGUI::saveLayout ( )

Save layout.

Definition at line 487 of file class.ilLMPageObjectGUI.php.

References $ilCtrl, ilLMObjectGUI\$lng, ilLMObjectGUI\$tpl, initEditLayoutForm(), ilUtil\sendSuccess(), and ilLMObject\writeLayout().

488  {
489  global $tpl, $lng, $ilCtrl;
490 
491  $this->initEditLayoutForm();
492  if ($this->form->checkInput())
493  {
494  ilLMObject::writeLayout($this->obj->getId(), $this->form->getInput("layout"));
495  ilUtil::sendSuccess($lng->txt("msg_obj_modified"), true);
496  $ilCtrl->redirect($this, "editLayout");
497  }
498  $this->form->setValuesByPost();
499  $tpl->setContent($this->form->getHtml());
500  }
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static writeLayout($a_obj_id, $a_layout, $a_lm=null)
Write layout setting.
global $ilCtrl
Definition: ilias.php:18
initEditLayoutForm()
Init edit layout form.
+ Here is the call graph for this function:

◆ setLMPageObject()

ilLMPageObjectGUI::setLMPageObject (   $a_pg_obj)

Set content object dependent page object (co page)

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

44  {
45  $this->obj = $a_pg_obj;
46  $this->obj->setLMId($this->content_object->getId());
47  }

◆ updateHistory()

ilLMPageObjectGUI::updateHistory ( )

update history

Definition at line 328 of file class.ilLMPageObjectGUI.php.

References ilHistory\_createEntry().

329  {
330  require_once("./Services/History/classes/class.ilHistory.php");
331  ilHistory::_createEntry($this->obj->getId(), "update",
332  "", $this->content_object->getType().":pg",
333  "", true);
334  }
_createEntry($a_obj_id, $a_action, $a_info_params="", $a_obj_type="", $a_user_comment="", $a_update_last=false)
Creates a new history entry for an object.
+ Here is the call graph for this function:

Field Documentation

◆ $obj

ilLMPageObjectGUI::$obj

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

Referenced by editLayout(), and executeCommand().


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