Inheritance diagram for ilLMPageObjectGUI:
Collaboration diagram for ilLMPageObjectGUI:Public Member Functions | |
| ilLMPageObjectGUI (&$a_content_obj) | |
| Constructor. | |
| _forwards () | |
| get all gui classes that are called from this one (see class ilCtrl) | |
| setLMPageObject (&$a_pg_obj) | |
| set content object dependent page object (co page) | |
| & | executeCommand () |
| execute command | |
| view () | |
| preview () | |
| save () | |
| save co page object | |
| cancel () | |
| cancel | |
| getLinkXML ($a_int_links) | |
| get link targets | |
| history () | |
| history | |
| updateHistory () | |
| update history | |
| setTabs () | |
| output tabs | |
| getTabs (&$tabs_gui) | |
| adds tabs to tab gui object | |
Data Fields | |
| $obj | |
Definition at line 43 of file class.ilLMPageObjectGUI.php.
| ilLMPageObjectGUI::_forwards | ( | ) |
get all gui classes that are called from this one (see class ilCtrl)
| array | array of gui classes that are called |
Definition at line 66 of file class.ilLMPageObjectGUI.php.
{
return (array("ilPageObjectGUI", "ilInternalLinkGUI"));
}
| ilLMPageObjectGUI::cancel | ( | ) |
cancel
Definition at line 217 of file class.ilLMPageObjectGUI.php.
References $_GET, ilUtil::redirect(), and sendInfo().
{
sendInfo($this->lng->txt("msg_cancel"), true);
if ($_GET["obj_id"] != 0)
{
ilUtil::redirect($this->ctrl->getLinkTargetByClass("ilStructureObjectGUI",
"view", "", true));
}
//$this->ctrl->returnToParent($this);
}
Here is the call graph for this function:| & ilLMPageObjectGUI::executeCommand | ( | ) |
execute command
Definition at line 84 of file class.ilLMPageObjectGUI.php.
References $_GET, $cmd, ilLMPageObject::_getPresentationTitle(), getLinkXML(), and setTabs().
Referenced by preview(), and view().
{
//echo "<br>:cmd:".$this->ctrl->getCmd().":cmdClass:".$this->ctrl->getCmdClass().":"; flush();
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
case 'ilmdeditorgui':
$this->setTabs();
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->content_object->getID(),
$this->obj->getId(), $this->obj->getType());
$md_gui->addObserver($this->obj,'MDUpdateListener','General');
$this->ctrl->forwardCommand($md_gui);
break;
case "ilpageobjectgui":
// Determine whether the view of a learning resource should
// be shown in the frameset of ilias, or in a separate window.
$showViewInFrameset = $this->ilias->ini->readVariable("layout","view_target") == "frame";
$this->ctrl->setReturn($this, "view");
//require_once("content/classes/class.ilContObjLocatorGUI.php");
//$contObjLocator =& new ilContObjLocatorGUI($this->content_object->getTree());
//$contObjLocator->setObject($this->obj);
//$contObjLocator->setContentObject($this->content_object);
$page_object =& $this->obj->getPageObject();
$page_object->buildDom();
$page_object->addUpdateListener($this, "updateHistory");
$int_links = $page_object->getInternalLinks();
$link_xml = $this->getLinkXML($int_links);
$page_gui =& new ilPageObjectGUI($page_object);
// set page view link
if ($showViewInFrameset)
{
$view_frame = "bottom";
}
else
{
$view_frame = "ilContObj".$this->content_object->getID();
}
$page_gui->setViewPageLink(ILIAS_HTTP_PATH."/goto.php?target=pg_".$this->obj->getId(),
$view_frame);
$page_gui->setIntLinkHelpDefault("StructureObject", $_GET["ref_id"]);
$page_gui->setTemplateTargetVar("ADM_CONTENT");
$page_gui->setLinkXML($link_xml);
$page_gui->enableChangeComments($this->content_object->isActiveHistoryUserComments());
$page_gui->setFileDownloadLink(ILIAS_HTTP_PATH."/content/lm_presentation.php?cmd=downloadFile".
"&ref_id=".$this->content_object->getRefId());
$page_gui->setFullscreenLink(ILIAS_HTTP_PATH."/content/lm_presentation.php?cmd=fullscreen".
"&ref_id=".$this->content_object->getRefId());
//$page_gui->setImageMapLink($this->ctrl->getLinkTargetByClass("ilpageobjectgui",
// "showImageMap"));
$page_gui->setLinkParams("ref_id=".$this->content_object->getRefId());
$page_gui->setSourcecodeDownloadScript(ILIAS_HTTP_PATH."/content/lm_presentation.php?ref_id=".$this->content_object->getRefId());
$page_gui->setPresentationTitle(
ilLMPageObject::_getPresentationTitle($this->obj->getId(),
$this->content_object->getPageHeader(), $this->content_object->isActiveNumbering()));
$page_gui->setLocator($contObjLocator);
$page_gui->setHeader($this->lng->txt("page").": ".$this->obj->getTitle());
$ret =& $this->ctrl->forwardCommand($page_gui);
//$ret =& $page_gui->executeCommand();
break;
default:
$ret =& $this->$cmd();
break;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLMPageObjectGUI::getLinkXML | ( | $ | a_int_links | ) |
get link targets
Definition at line 231 of file class.ilLMPageObjectGUI.php.
References $_GET, $lm_id, $obj_id, $t_frame, $target_arr, $target_id, $type, ilFrameTargetInfo::_getFrame(), ilLMObject::_lookupContObjID(), ilObject::_lookupObjId(), and ilObject::_lookupType().
Referenced by executeCommand().
{
if ($a_layoutframes == "")
{
$a_layoutframes = array();
}
$link_info = "<IntLinkInfos>";
foreach ($a_int_links as $int_link)
{
$target = $int_link["Target"];
if (substr($target, 0, 4) == "il__")
{
$target_arr = explode("_", $target);
$target_id = $target_arr[count($target_arr) - 1];
$type = $int_link["Type"];
$targetframe = ($int_link["TargetFrame"] != "")
? $int_link["TargetFrame"]
: "None";
switch($type)
{
case "PageObject":
case "StructureObject":
$lm_id = ilLMObject::_lookupContObjID($target_id);
$cont_obj =& $this->content_object;
if ($lm_id == $cont_obj->getId())
{
if ($type == "PageObject")
{
$this->ctrl->setParameter($this, "obj_id", $target_id);
$href = $this->ctrl->getLinkTargetByClass(get_class($this), "view", "", true);
}
else
{
$this->ctrl->setParameterByClass("ilstructureobjectgui", "obj_id", $target_id);
$href = $this->ctrl->getLinkTargetByClass("ilstructureobjectgui", "view", "", true);
}
$href = str_replace("&", "&", $href);
$this->ctrl->setParameter($this, "obj_id", $_GET["obj_id"]);
}
else
{
if ($type == "PageObject")
{
$href = "../goto.php?target=pg_".$target_id;
}
else
{
$href = "../goto.php?target=st_".$target_id;
}
$ltarget = "ilContObj".$lm_id;
}
break;
case "GlossaryItem":
$ltarget = $nframe = "_new";
$href = "content/lm_presentation.php?obj_type=$type&cmd=glossary&ref_id=".$_GET["ref_id"].
"&obj_id=".$target_id."&frame=$nframe";
break;
case "MediaObject":
$ltarget = $nframe = "_new";
$href = "content/lm_presentation.php?obj_type=$type&cmd=media&ref_id=".$_GET["ref_id"].
"&mob_id=".$target_id."&frame=$nframe";
break;
case "RepositoryItem":
$obj_type = ilObject::_lookupType($target_id, true);
$obj_id = ilObject::_lookupObjId($target_id);
$href = "./goto.php?target=".$obj_type."_".$target_id;
$t_frame = ilFrameTargetInfo::_getFrame("MainContent", $obj_type);
$ltarget = $t_frame;
break;
}
$link_info.="<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
"TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
}
}
$link_info.= "</IntLinkInfos>";
return $link_info;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLMPageObjectGUI::getTabs | ( | &$ | tabs_gui | ) |
adds tabs to tab gui object
| object | $tabs_gui ilTabsGUI object |
Definition at line 372 of file class.ilLMPageObjectGUI.php.
References $tab.
Referenced by setTabs().
{
// back to upper context
$tabs_gui->addTarget("edit", $this->ctrl->getLinkTarget($this, "view")
, "view", get_class($this));
$tabs_gui->addTarget("cont_preview", $this->ctrl->getLinkTarget($this, "preview")
, "preview", get_class($this));
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
"meta_data", get_class($this));
$tabs_gui->addTarget("history", $this->ctrl->getLinkTarget($this, "history")
, "history", get_class($this));
$tabs = $this->ctrl->getTabs();
foreach ($tabs as $tab)
{
$tabs_gui->addTarget($tab["lang_var"], $tab["link"]
, $tab["cmd"], $tab["class"]);
}
//$tabs_gui->addTarget("clipboard", $this->ctrl->getLinkTargetByClass("ilEditClipboardGUI", "view")
// , "view", "ilEditClipboardGUI");
}
Here is the caller graph for this function:| ilLMPageObjectGUI::history | ( | ) |
history
public
Definition at line 320 of file class.ilLMPageObjectGUI.php.
References setTabs().
{
$this->setTabs();
require_once("classes/class.ilHistoryGUI.php");
$hist_gui =& new ilHistoryGUI($this->obj->getId() ,
$this->content_object->getType().":pg");
$hist_html = $hist_gui->getHistoryTable(
$this->ctrl->getParameterArray($this, "history"),
$this->content_object->isActiveHistoryUserComments()
);
$this->tpl->setVariable("ADM_CONTENT", $hist_html);
}
Here is the call graph for this function:| ilLMPageObjectGUI::ilLMPageObjectGUI | ( | &$ | a_content_obj | ) |
Constructor.
| object | $a_content_obj content object (lm | dbk) public |
Definition at line 53 of file class.ilLMPageObjectGUI.php.
References ilLMObjectGUI::$ilias, ilLMObjectGUI::$lng, ilLMObjectGUI::$tpl, and ilLMObjectGUI::ilLMObjectGUI().
{
global $ilias, $tpl, $lng;
parent::ilLMObjectGUI($a_content_obj);
}
Here is the call graph for this function:| ilLMPageObjectGUI::preview | ( | ) |
Definition at line 177 of file class.ilLMPageObjectGUI.php.
References executeCommand(), and setTabs().
{
$this->ctrl->setCmdClass("ilpageobjectgui");
$this->ctrl->setCmd("preview");
$this->executeCommand();
$this->setTabs();
}
Here is the call graph for this function:| ilLMPageObjectGUI::save | ( | ) |
save co page object
Definition at line 189 of file class.ilLMPageObjectGUI.php.
References $_GET, $_POST, ilLMObjectGUI::checkTree(), ilLMObjectGUI::putInTree(), ilUtil::redirect(), and ilUtil::stripSlashes().
{
$this->obj =& new ilLMPageObject($this->content_object);
$this->obj->setType("pg");
$this->obj->setTitle(ilUtil::stripSlashes($_POST["Fobject"]["title"]));
$this->obj->setDescription(ilUtil::stripSlashes($_POST["Fobject"]["desc"]));
$this->obj->setLMId($this->content_object->getId());
$this->obj->create();
// obj_id is empty, if page is created from "all pages" screen
// -> a free page is created (not in the tree)
//echo "<br>savePage:".$_GET["obj_id"].":";
if ($_GET["obj_id"] != 0)
{
$this->putInTree();
// check the tree
$this->checkTree();
ilUtil::redirect($this->ctrl->getLinkTargetByClass("ilStructureObjectGUI",
"view", "", true));
}
}
Here is the call graph for this function:| ilLMPageObjectGUI::setLMPageObject | ( | &$ | a_pg_obj | ) |
set content object dependent page object (co page)
Definition at line 74 of file class.ilLMPageObjectGUI.php.
{
$this->obj =& $a_pg_obj;
$this->obj->setLMId($this->content_object->getId());
$this->actions = $this->objDefinition->getActions($this->obj->getType());
}
| ilLMPageObjectGUI::setTabs | ( | ) |
output tabs
Definition at line 350 of file class.ilLMPageObjectGUI.php.
References ilUtil::getImagePath(), and getTabs().
Referenced by executeCommand(), history(), preview(), and view().
{
// catch feedback message
include_once("classes/class.ilTabsGUI.php");
$tabs_gui =& new ilTabsGUI();
$this->getTabs($tabs_gui);
$this->tpl->setCurrentBlock("header_image");
$this->tpl->setVariable("IMG_HEADER", ilUtil::getImagePath("icon_pg.gif"));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("content");
$this->tpl->setVariable("TABS", $tabs_gui->getHTML());
$this->tpl->setVariable("HEADER",
$this->lng->txt($this->obj->getType()).": ".$this->obj->getTitle());
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilLMPageObjectGUI::updateHistory | ( | ) |
update history
Definition at line 338 of file class.ilLMPageObjectGUI.php.
References ilHistory::_createEntry().
{
require_once("classes/class.ilHistory.php");
ilHistory::_createEntry($this->obj->getId(), "update",
"", $this->content_object->getType().":pg",
"", true);
}
Here is the call graph for this function:| ilLMPageObjectGUI::view | ( | ) |
Definition at line 165 of file class.ilLMPageObjectGUI.php.
References executeCommand(), and setTabs().
{
//echo "<br>umschuss";
$this->ctrl->setCmdClass("ilpageobjectgui");
$this->ctrl->setCmd("view");
$this->executeCommand();
$this->setTabs();
}
Here is the call graph for this function:| ilLMPageObjectGUI::$obj |
Reimplemented from ilLMObjectGUI.
Definition at line 45 of file class.ilLMPageObjectGUI.php.
1.7.1