本文整理汇总了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);
}