本文整理匯總了PHP中ilObjStyleSheet::getTemplateXML方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilObjStyleSheet::getTemplateXML方法的具體用法?PHP ilObjStyleSheet::getTemplateXML怎麽用?PHP ilObjStyleSheet::getTemplateXML使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilObjStyleSheet
的用法示例。
在下文中一共展示了ilObjStyleSheet::getTemplateXML方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: showPage
//.........這裏部分代碼省略.........
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_c" . $hid);
$tpl->parseCurrentBlock();
}
// list item menues
foreach ($litem_ids as $hid) {
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_i" . $hid);
$tpl->parseCurrentBlock();
}
// file item menues
foreach ($fitem_ids as $hid) {
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_i" . $hid);
$tpl->parseCurrentBlock();
}
} else {
$this->obj->addFileSizes();
}
//echo "<br>-".htmlentities($this->obj->getXMLContent())."-<br><br>";
//echo "<br>-".htmlentities($this->getLinkXML())."-";
// set default link xml, if nothing was set yet
if (!$this->link_xml_set) {
$this->setDefaultLinkXml();
}
//$content = $this->obj->getXMLFromDom(false, true, true,
// $this->getLinkXML().$this->getQuestionXML().$this->getComponentPluginsXML());
$link_xml = $this->getLinkXML();
// disable/enable auto margins
if ($this->getStyleId() > 0) {
if (ilObject::_lookupType($this->getStyleId()) == "sty") {
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$style = new ilObjStyleSheet($this->getStyleId());
$template_xml = $style->getTemplateXML();
$disable_auto_margins = "n";
if ($style->lookupStyleSetting("disable_auto_margins")) {
$disable_auto_margins = "y";
}
}
}
if ($this->getAbstractOnly()) {
$content = "<dummy><PageObject><PageContent><Paragraph>" . $this->obj->getFirstParagraphText() . $link_xml . "</Paragraph></PageContent></PageObject></dummy>";
} else {
$content = $this->obj->getXMLFromDom(false, true, true, $link_xml . $this->getQuestionXML() . $template_xml . $this->getComponentPluginsXML());
}
// check validation errors
if ($builded !== true) {
$this->displayValidationError($builded);
} else {
$this->displayValidationError($_SESSION["il_pg_error"]);
}
unset($_SESSION["il_pg_error"]);
if (isset($_SESSION["citation_error"])) {
ilUtil::sendFailure($this->lng->txt("cont_citation_selection_not_valid"));
ilSession::clear("citation_error");
}
// get title
$pg_title = $this->getPresentationTitle();
$col_path = ilUtil::getImagePath("col.svg");
$row_path = ilUtil::getImagePath("row.svg");
$item_path = ilUtil::getImagePath("item.svg");
if ($this->getOutputMode() != "offline") {
$enlarge_path = ilUtil::getImagePath("enlarge.svg");
$wb_path = ilUtil::getWebspaceDir("output") . "/";
} else {
$enlarge_path = "images/enlarge.svg";
示例2: renderTable
/**
* Render the table
*/
function renderTable($a_mode = "table_edit", $a_submode = "")
{
$tab_node = $this->content_obj->getNode();
$tab_node->set_attribute("Enabled", "True");
$content = $this->dom->dump_node($tab_node);
$trans = $this->pg_obj->getLanguageVariablesXML();
$mobs = $this->pg_obj->getMultimediaXML();
if ($this->getStyleId() > 0) {
if (ilObject::_lookupType($this->getStyleId()) == "sty") {
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$style = new ilObjStyleSheet($this->getStyleId());
$template_xml = $style->getTemplateXML();
}
}
$content = $content . $mobs . $trans . $template_xml;
return ilPCTableGUI::_renderTable($content, $a_mode, $a_submode, $this->content_obj);
}