/** * output glossary term definitions * * used in ilLMPresentationGUI->ilGlossary() */ function output($a_offline = false, $a_tpl = "", $a_outputmode = "presentation") { if ($a_tpl != "") { $tpl = $a_tpl; } else { $tpl = $this->tpl; } require_once "./Modules/Glossary/classes/class.ilGlossaryDefinition.php"; require_once "./Services/COPage/classes/class.ilPageObjectGUI.php"; $defs = ilGlossaryDefinition::getDefinitionList($this->term->getId()); $tpl->setVariable("TXT_TERM", $this->term->getTerm()); for ($j = 0; $j < count($defs); $j++) { $def = $defs[$j]; $page_gui = new ilPageObjectGUI("gdf", $def["id"]); $page_gui->setSourcecodeDownloadScript("ilias.php?baseClass=ilGlossaryPresentationGUI&ref_id=" . $_GET["ref_id"]); if (!$a_offline) { //$page_gui->setFullscreenLink( // "ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=fullscreen&ref_id=".$_GET["ref_id"]); } else { $page_gui->setFullscreenLink("fullscreen.html"); // id is set by xslt } $page_gui->setFileDownloadLink("ilias.php?baseClass=ilGlossaryPresentationGUI&cmd=downloadFile&ref_id=" . $_GET["ref_id"]); if (!$a_offline) { $page_gui->setOutputMode($a_outputmode); } else { $page_gui->setOutputMode("offline"); $page_gui->setOfflineDirectory($this->getOfflineDirectory()); } //$page_gui->setOutputMode("edit"); //$page_gui->setPresentationTitle($this->term->getTerm()); $page_gui->setLinkXML($this->getLinkXML()); $page_gui->setTemplateOutput(false); $output = $page_gui->presentation($page_gui->getOutputMode()); if (count($defs) > 1) { $tpl->setCurrentBlock("definition_header"); $tpl->setVariable("TXT_DEFINITION", $this->lng->txt("cont_definition") . " " . ($j + 1)); $tpl->parseCurrentBlock(); } $tpl->setCurrentBlock("definition"); $tpl->setVariable("PAGE_CONTENT", $output); $tpl->parseCurrentBlock(); } }
public function forwardToPageObject() { global $lng, $ilTabs; $ilTabs->clearTargets(); $ilTabs->setBackTarget($lng->txt('back'), $this->ctrl->getLinkTarget($this), '_top'); // page object include_once 'Services/COPage/classes/class.ilPageObject.php'; include_once 'Services/COPage/classes/class.ilPageObjectGUI.php'; $lng->loadLanguageModule('content'); include_once './Services/Style/classes/class.ilObjStyleSheet.php'; $this->tpl->setVariable('LOCATION_CONTENT_STYLESHEET', ilObjStyleSheet::getContentStylePath(0)); if (!ilPageObject::_exists('shop', self::SHOP_PAGE_EDITOR_PAGE_ID)) { // doesn't exist -> create new one $new_page_object = new ilPageObject('shop'); $new_page_object->setParentId(0); $new_page_object->setId(self::SHOP_PAGE_EDITOR_PAGE_ID); $new_page_object->createFromXML(); } $this->ctrl->setReturnByClass('ilpageobjectgui', 'edit'); $page_gui = new ilPageObjectGUI('shop', self::SHOP_PAGE_EDITOR_PAGE_ID); $page_gui->setIntLinkHelpDefault('StructureObject', self::SHOP_PAGE_EDITOR_PAGE_ID); $page_gui->setTemplateTargetVar('ADM_CONTENT'); $page_gui->setLinkXML(''); $page_gui->setFileDownloadLink($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'downloadFile')); $page_gui->setFullscreenLink($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'displayMediaFullscreen')); $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTargetByClass(array('ilpageobjectgui'), 'download_paragraph')); $page_gui->setPresentationTitle(''); $page_gui->setTemplateOutput(false); $page_gui->setHeader(''); $page_gui->setEnabledRepositoryObjects(false); $page_gui->setEnabledFileLists(true); $page_gui->setEnabledMaps(true); $page_gui->setEnabledPCTabs(true); return $this->ctrl->forwardCommand($page_gui); }
private function __getAbstractHTML($a_payment_object_id) { // page object include_once 'Services/COPage/classes/class.ilPageObject.php'; include_once 'Services/COPage/classes/class.ilPageObjectGUI.php'; // if page does not exist, return nothing if (!ilPageObject::_exists('shop', $a_payment_object_id)) { return ''; } include_once 'Services/Style/classes/class.ilObjStyleSheet.php'; // get page object $page_gui = new ilPageObjectGUI('shop', $a_payment_object_id); $page_gui->setIntLinkHelpDefault('StructureObject', $a_payment_object_id); $page_gui->setLinkXML(''); $page_gui->setFileDownloadLink($this->ctrl->getLinkTargetByClass('ilPageObjectGUI', 'downloadFile')); $page_gui->setFullscreenLink($this->ctrl->getLinkTargetByClass('ilPageObjectGUI', 'displayMediaFullscreen')); $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTargetByClass('ilPageObjectGUI', 'download_paragraph')); $page_gui->setPresentationTitle(''); $page_gui->setTemplateOutput(false); $page_gui->setHeader(''); $page_gui->setEnabledRepositoryObjects(false); $page_gui->setEnabledFileLists(false); $page_gui->setEnabledPCTabs(true); $page_gui->setEnabledMaps(true); return $page_gui->showPage(); }