当前位置: 首页>>代码示例>>PHP>>正文


PHP ilTemplate::setBodyClass方法代码示例

本文整理汇总了PHP中ilTemplate::setBodyClass方法的典型用法代码示例。如果您正苦于以下问题:PHP ilTemplate::setBodyClass方法的具体用法?PHP ilTemplate::setBodyClass怎么用?PHP ilTemplate::setBodyClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilTemplate的用法示例。


在下文中一共展示了ilTemplate::setBodyClass方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ilTemplate

 /**
  * SCO preview
  */
 function sco_preview()
 {
     global $tpl, $ilCtrl, $lng;
     // init main template
     $tpl = new ilTemplate("tpl.main.html", true, true);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $tpl->setBodyClass("");
     $tpl->setCurrentBlock("ContentStyle");
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath($this->slm_object->getStyleSheetId()));
     $tpl->parseCurrentBlock();
     // get javascript
     include_once "./Services/jQuery/classes/class.iljQueryUtil.php";
     iljQueryUtil::initjQuery();
     iljQueryUtil::initjQueryUI();
     $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/pure.js");
     $tpl->addJavaScript("./Modules/Scorm2004/scripts/pager.js");
     $tpl->addOnLoadCode("pager.Init();");
     $tree = new ilTree($this->slm_object->getId());
     $tree->setTableNames('sahs_sc13_tree', 'sahs_sc13_tree_node');
     $tree->setTreeTablePK("slm_id");
     include_once "./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php";
     include_once "./Services/MetaData/classes/class.ilMD.php";
     $meta = new ilMD($this->node_object->getSLMId(), $this->node_object->getId(), $this->node_object->getType());
     $desc_ids = $meta->getGeneral()->getDescriptionIds();
     $sco_description = $meta->getGeneral()->getDescription($desc_ids[0])->getDescription();
     // get sco template
     $sco_tpl = new ilTemplate("tpl.sco.html", true, true, "Modules/Scorm2004");
     // navigation
     $lk = ilObjSAHSLearningModule::getAffectiveLocalization($this->node_object->getSLMId());
     ilSCORM2004Asset::renderNavigation($sco_tpl, "", $lk);
     // meta page (description and objectives)
     ilSCORM2004Asset::renderMetaPage($sco_tpl, $this->node_object, $this->node_object->getType());
     // init export (this initialises glossary template)
     ilSCORM2004PageGUI::initExport();
     $terms = $this->node_object->getGlossaryTermIds();
     // render page
     foreach ($tree->getSubTree($tree->getNodeData($this->node_object->getId()), true, 'page') as $page) {
         $page_obj = new ilSCORM2004PageGUI($this->node_object->getType(), $page["obj_id"], 0, $this->slm_object->getId());
         $page_obj->setPresentationTitle($page["title"]);
         $page_obj->setOutputMode(IL_PAGE_PREVIEW);
         $page_obj->setStyleId($this->slm_object->getStyleSheetId());
         if (count($terms) > 1) {
             $page_obj->setGlossaryOverviewInfo(ilSCORM2004ScoGUI::getGlossaryOverviewId(), $this->node_object);
         }
         $sco_tpl->setCurrentBlock("page_preview");
         $html = $ilCtrl->getHTML($page_obj);
         //$sco_tpl->setVariable("PAGE_PRV", $page_obj->showPage("export"));
         $sco_tpl->setVariable("PAGE_PRV", $html);
         $sco_tpl->parseCurrentBlock();
     }
     $output = $sco_tpl->get();
     // append glossary entries on the sco level
     $output .= ilSCORM2004PageGUI::getGlossaryHTML($this->node_object);
     //insert questions
     require_once './Modules/Scorm2004/classes/class.ilQuestionExporter.php';
     $output = preg_replace_callback("/{{{{{(Question;)(il__qst_[0-9]+)}}}}}/", array(get_class($this), 'insertQuestion'), $output);
     //		$output = preg_replace("/{/","",$output);
     //		$output = preg_replace("/}/","",$output);
     $output = "<script>var ScormApi=null;" . ilQuestionExporter::questionsJS() . "</script>" . $output;
     $lk = ilObjSAHSLearningModule::getAffectiveLocalization($this->node_object->getSLMId());
     //		include_once("./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php");
     //		ilSCORM2004PageGUI::addPreparationJavascript($tpl, $lk);
     $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/question_handling.js");
     $tpl->addCss("./Modules/Scorm2004/templates/default/question_handling.css");
     include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
     ilOverlayGUI::initJavascript();
     //inline JS
     $output .= '<script type="text/javascript" src="./Modules/Scorm2004/scripts/questions/question_handling.js"></script>';
     $tpl->setVariable("CONTENT", $output);
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:74,代码来源:class.ilSCORM2004ScoGUI.php

示例2: getFullscreenHTML

 /**
  * render list in fullscreen mode
  * 
  * @return string
  */
 public function getFullscreenHTML()
 {
     $tpl = new ilTemplate('tpl.main.html', true, true);
     $tpl->setBodyClass("ilBodyPrint");
     // load style sheet depending on user's settings
     $location_stylesheet = ilUtil::getStyleSheetLocation();
     $tpl->setVariable("LOCATION_STYLESHEET", $location_stylesheet);
     $tpl->setVariable("BODY_ATTRIBUTES", 'onload="window.print()"');
     $tpl->setVariable("CONTENT", $this->getHTML());
     return $tpl->show();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:16,代码来源:class.ilAttendanceList.php

示例3: showPage

 /**
  * Show page
  *
  * @param
  * @return
  */
 function showPage()
 {
     global $tpl;
     $tpl = new ilTemplate("tpl.main.html", true, true);
     include_once "./Services/Container/classes/class.ilContainerPage.php";
     include_once "./Services/Container/classes/class.ilContainerPageGUI.php";
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     $tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
     $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
     $tpl->setCurrentBlock("SyntaxStyle");
     $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
     $tpl->parseCurrentBlock();
     // get page object
     //include_once("./Services/Object/classes/class.ilObjectTranslation.php");
     //$ot = ilObjectTranslation::getInstance($this->object->getId());
     //$lang = $ot->getEffectiveContentLang($ilUser->getCurrentLanguage(), "cont");
     include_once "./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php";
     $page_gui = new ilMediaPoolPageGUI((int) $_GET["mepitem_id"]);
     include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
     //$page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
     //	$this->object->getStyleSheetId(), $this->object->getType()));
     $page_gui->setTemplateOutput(false);
     $page_gui->setHeader("");
     $ret = $page_gui->showPage(true);
     $tpl->setBodyClass("ilMediaPoolPagePreviewBody");
     $tpl->setVariable("CONTENT", $ret);
     //$ret = "<div style='background-color: white; padding:5px; margin-bottom: 30px;'>".$ret."</div>";
     //$ret =& $page_gui->executeCommand();
     $tpl->show();
     exit;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:37,代码来源:class.ilObjMediaPoolGUI.php


注:本文中的ilTemplate::setBodyClass方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。