Inheritance diagram for ilPageContentGUI:Public Member Functions | |
| ilPageContentGUI (&$a_pg_obj, &$a_content_obj, $a_hier_id=0) | |
| Constructor public. | |
| getHierId () | |
| get hierarchical id in dom object | |
| delete () | |
| delete content element | |
| moveAfter () | |
| move content element after another element | |
| moveBefore () | |
| move content element before another element | |
| splitPage () | |
| split page to new page at specified position | |
| splitPageNext () | |
| split page to next page at specified position | |
| displayValidationError () | |
| display validation errors | |
| cancelCreate () | |
| cancel creating page content | |
| cancelUpdate () | |
| cancel update | |
Data Fields | |
| $content_obj | |
| $ilias | |
| $tpl | |
| $lng | |
| $ctrl | |
| $pg_obj | |
| $hier_id | |
| $dom | |
| $updated | |
| $target_script | |
| $return_location | |
Definition at line 34 of file class.ilPageContentGUI.php.
| ilPageContentGUI::cancelCreate | ( | ) |
cancel creating page content
Reimplemented in ilPCSourcecodeGUI.
Definition at line 292 of file class.ilPageContentGUI.php.
{
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}
| ilPageContentGUI::cancelUpdate | ( | ) |
cancel update
Reimplemented in ilPCSourcecodeGUI.
Definition at line 300 of file class.ilPageContentGUI.php.
{
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}
| ilPageContentGUI::delete | ( | ) |
delete content element
Definition at line 103 of file class.ilPageContentGUI.php.
| ilPageContentGUI::displayValidationError | ( | ) |
display validation errors
Definition at line 267 of file class.ilPageContentGUI.php.
Referenced by ilPCTableGUI::edit(), ilPCSourcecodeGUI::edit(), ilPCParagraphGUI::edit(), ilPCListGUI::edit(), ilPCFileListGUI::edit(), ilPCMediaObjectGUI::editAlias(), ilPCTableGUI::insert(), ilPCSourcecodeGUI::insert(), ilPCParagraphGUI::insert(), ilPCMediaObjectGUI::insert(), ilPCListGUI::insert(), ilPCFileListGUI::insert(), ilPCFileItemGUI::newItemAfter(), and ilPCFileItemGUI::newItemBefore().
{
if(is_array($this->updated))
{
$error_str = "<b>Validation Error(s):</b><br>";
foreach ($this->updated as $error)
{
$err_mess = implode($error, " - ");
if (!is_int(strpos($err_mess, ":0:")))
{
$error_str .= htmlentities($err_mess)."<br />";
}
}
$this->tpl->setVariable("MESSAGE", $error_str);
}
else if($this->updated != "" && $this->updated !== true)
{
$this->tpl->setVariable("MESSAGE", "<b>Validation Error(s):</b><br />".
$this->updated."<br />");
}
}
Here is the caller graph for this function:| ilPageContentGUI::getHierId | ( | ) |
get hierarchical id in dom object
Definition at line 95 of file class.ilPageContentGUI.php.
Referenced by ilPCMediaObjectGUI::centerAlign(), ilPCMediaObjectGUI::editAlias(), ilPCParagraphGUI::insert(), ilPCMediaObjectGUI::leftAlign(), ilPCMediaObjectGUI::leftFloatAlign(), ilPCMediaObjectGUI::rightAlign(), ilPCMediaObjectGUI::rightFloatAlign(), and ilPCMediaObjectGUI::saveAliasProperties().
{
return $this->hier_id;
}
Here is the caller graph for this function:| ilPageContentGUI::ilPageContentGUI | ( | &$ | a_pg_obj, | |
| &$ | a_content_obj, | |||
| $ | a_hier_id = 0 | |||
| ) |
Constructor public.
Definition at line 52 of file class.ilPageContentGUI.php.
References $ilCtrl, $ilias, $lng, and $tpl.
Referenced by ilPCFileItemGUI::ilPCFileItemGUI(), ilPCFileListGUI::ilPCFileListGUI(), ilPCListGUI::ilPCListGUI(), ilPCListItemGUI::ilPCListItemGUI(), ilPCMediaObjectGUI::ilPCMediaObjectGUI(), ilPCParagraphGUI::ilPCParagraphGUI(), ilPCQuestionGUI::ilPCQuestionGUI(), ilPCSourcecodeGUI::ilPCSourcecodeGUI(), ilPCTableDataGUI::ilPCTableDataGUI(), and ilPCTableGUI::ilPCTableGUI().
{
global $ilias, $tpl, $lng, $ilCtrl;
$this->ilias =& $ilias;
$this->tpl =& $tpl;
$this->lng =& $lng;
$this->pg_obj =& $a_pg_obj;
$this->ctrl =& $ilCtrl;
$this->content_obj =& $a_content_obj;
if($a_hier_id !== 0)
{
$this->hier_id = $a_hier_id;
$this->dom =& $a_pg_obj->getDom();
}
}
Here is the caller graph for this function:| ilPageContentGUI::moveAfter | ( | ) |
move content element after another element
Definition at line 120 of file class.ilPageContentGUI.php.
References $_POST, $_SESSION, and $updated.
{
// check if a target is selected
if(!isset($_POST["target"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// check if only one target is selected
if(count($_POST["target"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("only_one_target"),$this->ilias->error_obj->MESSAGE);
}
// check if target is within source
if($this->hier_id == substr($_POST["target"][0], 0, strlen($this->hier_id)))
{
$this->ilias->raiseError($this->lng->txt("cont_target_within_source"),$this->ilias->error_obj->MESSAGE);
}
// strip "c" "r" of table ids from hierarchical id
$first_hier_character = substr($_POST["target"][0], 0, 1);
if ($first_hier_character == "c" ||
$first_hier_character == "r" ||
$first_hier_character == "i")
{
$_POST["target"][0] = substr($_POST["target"][0], 1);
}
// move
$updated = $this->pg_obj->moveContentAfter($this->hier_id, $_POST["target"][0]);
if($updated !== true)
{
$_SESSION["il_pg_error"] = $updated;
}
else
{
unset($_SESSION["il_pg_error"]);
}
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}
| ilPageContentGUI::moveBefore | ( | ) |
move content element before another element
Definition at line 166 of file class.ilPageContentGUI.php.
References $_POST, $_SESSION, and $updated.
{
// check if a target is selected
if(!isset($_POST["target"]))
{
$this->ilias->raiseError($this->lng->txt("no_checkbox"),$this->ilias->error_obj->MESSAGE);
}
// check if target is within source
if(count($_POST["target"]) > 1)
{
$this->ilias->raiseError($this->lng->txt("only_one_target"),$this->ilias->error_obj->MESSAGE);
}
// check if target is within source
if($this->hier_id == substr($_POST["target"][0], 0, strlen($this->hier_id)))
{
$this->ilias->raiseError($this->lng->txt("cont_target_within_source"),$this->ilias->error_obj->MESSAGE);
}
// strip "c" "r" of table ids from hierarchical id
$first_hier_character = substr($_POST["target"][0], 0, 1);
if ($first_hier_character == "c" ||
$first_hier_character == "r" ||
$first_hier_character == "i")
{
$_POST["target"][0] = substr($_POST["target"][0], 1);
}
// move
$updated = $this->pg_obj->moveContentBefore($this->hier_id, $_POST["target"][0]);
if($updated !== true)
{
$_SESSION["il_pg_error"] = $updated;
}
else
{
unset($_SESSION["il_pg_error"]);
}
$this->ctrl->returnToParent($this, "jump".$this->hier_id);
}
| ilPageContentGUI::splitPage | ( | ) |
split page to new page at specified position
Definition at line 212 of file class.ilPageContentGUI.php.
References $ilErr, and ilLMPageObject::_splitPage().
{
global $ilErr;
if ($this->pg_obj->getParentType() != "lm" &&
$this->pg_obj->getParentType() != "dbk")
{
$ilErr->raiseError("Split method called for wrong parent type (".
$this->pg_obj->getParentType().")", $ilErr->FATAL);
}
else
{
$lm_page =& ilLMPageObject::_splitPage($this->pg_obj->getId(),
$this->pg_obj->getParentType(), $this->hier_id);
// jump to new page
$this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $lm_page->getId());
$this->ctrl->redirectByClass("illmpageobjectgui", "view");
}
$this->ctrl->returnToParent($this, "jump".($this->hier_id - 1));
}
Here is the call graph for this function:| ilPageContentGUI::splitPageNext | ( | ) |
split page to next page at specified position
Definition at line 238 of file class.ilPageContentGUI.php.
References $ilErr, and ilLMPageObject::_splitPageNext().
{
global $ilErr;
if ($this->pg_obj->getParentType() != "lm" &&
$this->pg_obj->getParentType() != "dbk")
{
$ilErr->raiseError("Split method called for wrong parent type (".
$this->pg_obj->getParentType().")", $ilErr->FATAL);
}
else
{
$succ_id = ilLMPageObject::_splitPageNext($this->pg_obj->getId(),
$this->pg_obj->getParentType(), $this->hier_id);
// jump to successor page
if ($succ_id > 0)
{
$this->ctrl->setParameterByClass("illmpageobjectgui", "obj_id", $succ_id);
$this->ctrl->redirectByClass("illmpageobjectgui", "view");
}
}
$this->ctrl->returnToParent($this, "jump".($this->hier_id - 1));
}
Here is the call graph for this function:| ilPageContentGUI::$content_obj |
Definition at line 36 of file class.ilPageContentGUI.php.
| ilPageContentGUI::$ctrl |
Reimplemented in ilPCMediaObjectGUI.
Definition at line 40 of file class.ilPageContentGUI.php.
| ilPageContentGUI::$dom |
Definition at line 43 of file class.ilPageContentGUI.php.
| ilPageContentGUI::$hier_id |
Definition at line 42 of file class.ilPageContentGUI.php.
Referenced by ilPCTableGUI::setClass(), and ilPCTableGUI::setWidth().
| ilPageContentGUI::$ilias |
Definition at line 37 of file class.ilPageContentGUI.php.
Referenced by ilPCParagraphGUI::edit(), and ilPageContentGUI().
| ilPageContentGUI::$lng |
Definition at line 39 of file class.ilPageContentGUI.php.
Referenced by ilPCTableGUI::create(), and ilPageContentGUI().
| ilPageContentGUI::$pg_obj |
Definition at line 41 of file class.ilPageContentGUI.php.
| ilPageContentGUI::$return_location |
Definition at line 46 of file class.ilPageContentGUI.php.
| ilPageContentGUI::$target_script |
Definition at line 45 of file class.ilPageContentGUI.php.
| ilPageContentGUI::$tpl |
Definition at line 38 of file class.ilPageContentGUI.php.
Referenced by ilPageContentGUI().
| ilPageContentGUI::$updated |
Definition at line 44 of file class.ilPageContentGUI.php.
Referenced by delete(), moveAfter(), and moveBefore().
1.7.1