本文整理汇总了PHP中ilLMObject::lookupLayout方法的典型用法代码示例。如果您正苦于以下问题:PHP ilLMObject::lookupLayout方法的具体用法?PHP ilLMObject::lookupLayout怎么用?PHP ilLMObject::lookupLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilLMObject
的用法示例。
在下文中一共展示了ilLMObject::lookupLayout方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: determineLayout
/**
* Determine layout
*/
function determineLayout()
{
if ($this->getExportFormat() == "scorm") {
$layout = "1window";
} else {
$layout = $this->lm->getLayout();
if ($this->lm->getLayoutPerPage()) {
$pg_id = $this->getCurrentPageId();
if (!in_array($_GET["frame"], array("", "_blank")) && $_GET["from_page"] > 0) {
$pg_id = (int) $_GET["from_page"];
}
// this is needed, e.g. lm is toc2win, page is 3window and media linked to media frame
if (in_array($_GET["cmd"], array("media", "glossary")) && $_GET["back_pg"] > 0) {
$pg_id = (int) $_GET["back_pg"];
}
if ($pg_id > 0) {
$lay = ilLMObject::lookupLayout($pg_id);
if ($lay != "") {
$layout = $lay;
}
}
}
}
return $layout;
}
示例2: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng, $ilCtrl;
//var_dump($a_set);
// icon...
// check activation
include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
$active = ilLMPage::_lookupActive($a_set["obj_id"], $this->lm->getType(), $this->lm_set->get("time_scheduled_page_activation"));
// is page scheduled?
$img_sc = $this->lm_set->get("time_scheduled_page_activation") && ilLMPage::_isScheduledActivation($a_set["obj_id"], $this->lm->getType()) ? "_sc" : "";
if (!$active) {
$img = "icon_pg_d" . $img_sc . ".svg";
$alt = $lng->txt("cont_page_deactivated");
} else {
if (ilLMPage::_lookupContainsDeactivatedElements($a_set["obj_id"], $this->lm->getType())) {
$img = "icon_pg_del" . $img_sc . ".svg";
$alt = $lng->txt("cont_page_deactivated_elements");
} else {
$img = "icon_pg" . $img_sc . ".svg";
$alt = $this->lng->txt("pg");
}
}
$this->tpl->setVariable("ICON", ilUtil::img(ilUtil::getImagePath($img), $alt));
// title/link
$ilCtrl->setParameter($this, "backcmd", "");
$ilCtrl->setParameterByClass("ilLMPageObjectGUI", "obj_id", $a_set["obj_id"]);
$this->tpl->setVariable("HREF_TITLE", $ilCtrl->getLinkTargetByClass("ilLMPageObjectGUI", "edit"));
$this->tpl->setVariable("TITLE", $a_set["title"]);
$this->tpl->setVariable("ID", $a_set["obj_id"]);
// context
if ($this->lm->lm_tree->isInTree($a_set["obj_id"])) {
$path_str = $this->parent_obj->getContextPath($a_set["obj_id"]);
} else {
$path_str = "---";
}
// check whether page is header or footer
$add_str = "";
if ($a_set["obj_id"] == $this->lm->getHeaderPage()) {
$add_str = " <b>(" . $lng->txt("cont_header") . ")</b>";
}
if ($a_set["obj_id"] == $this->lm->getFooterPage()) {
$add_str .= " <b>(" . $lng->txt("cont_footer") . ")</b>";
}
$this->tpl->setVariable("USAGE", $path_str . $add_str);
// layout
if ($this->lm->getLayoutPerPage()) {
if (($l = ilLMObject::lookupLayout($a_set["obj_id"])) != "") {
$this->tpl->setVariable("LAYOUT", $lng->txt("cont_layout_" . $l));
}
}
}
示例3: determineLayout
/**
* Determine layout
*/
function determineLayout()
{
if ($this->getExportFormat() == "scorm") {
$layout = "1window";
} else {
$layout = $this->lm->getLayout();
if ($this->lm->getLayoutPerPage()) {
$pg_id = $this->getCurrentPageId();
if ((in_array($_GET["cmd"], array("media", "glossary")) || !in_array($_GET["frame"], array("", "_blank"))) && $_GET["from_page"] > 0) {
$pg_id = (int) $_GET["from_page"];
}
if ($pg_id > 0) {
$lay = ilLMObject::lookupLayout($pg_id);
if ($lay != "") {
$layout = $lay;
}
}
}
}
return $layout;
}