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


PHP ilYuiUtil::initDom方法代码示例

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


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

示例1: show

 /**
  * @access	public
  * @param	string
  * @param bool fill template variable {TABS} with content of ilTabs
  */
 function show($part = "DEFAULT", $a_fill_tabs = true, $a_skip_main_menu = false)
 {
     global $ilias, $ilTabs;
     // include yahoo dom per default
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initDom();
     //echo "-".ilUtil::getP3PLocation()."-";
     //header('P3P: policyref="'.ilUtil::getP3PLocation().
     //	'", CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
     header('P3P: CP="CURa ADMa DEVa TAIa PSAa PSDa IVAa IVDa OUR BUS IND UNI COM NAV INT CNT STA PRE"');
     header("Content-type: " . $this->getContentType() . "; charset=UTF-8");
     $this->fillMessage();
     // display ILIAS footer
     if ($part !== false) {
         $this->addILIASFooter();
     }
     // set standard parts (tabs and title icon)
     $this->fillBodyClass();
     if ($a_fill_tabs) {
         if ($this->blockExists("content")) {
             // determine default screen id
             $this->getTabsHTML();
         }
         // to get also the js files for the main menu
         if (!$a_skip_main_menu) {
             $this->getMainMenu();
             $this->initHelp();
         }
         if ($this->blockExists("content") && $this->variableExists('MAINMENU')) {
             global $tpl;
             include_once 'Services/Authentication/classes/class.ilSessionReminderGUI.php';
             $session_reminder_gui = new ilSessionReminderGUI(ilSessionReminder::createInstanceWithCurrentUserSession());
             $tpl->setVariable('SESSION_REMINDER', $session_reminder_gui->getHtml());
         }
         // these fill blocks in tpl.main.html
         $this->fillCssFiles();
         $this->fillInlineCss();
         //$this->fillJavaScriptFiles();
         $this->fillContentStyle();
         // these fill just plain placeholder variables in tpl.main.html
         $this->setCurrentBlock("DEFAULT");
         $this->fillNewContentStyle();
         $this->fillContentLanguage();
         $this->fillWindowTitle();
         // these fill blocks in tpl.adm_content.html
         $this->fillHeader();
         $this->fillSideIcons();
         $this->fillScreenReaderFocus();
         $this->fillStopFloating();
         $this->fillLeftContent();
         $this->fillLeftNav();
         $this->fillRightContent();
         $this->fillAdminPanel();
         $this->fillToolbar();
         $this->fillPermanentLink();
         $this->setCenterColumnClass();
         // late loading of javascipr files, since operations above may add files
         $this->fillJavaScriptFiles();
         $this->fillOnLoadCode();
         // these fill just plain placeholder variables in tpl.adm_content.html
         // these fill just plain placeholder variables in tpl.adm_content.html
         if ($this->blockExists("content")) {
             $this->setCurrentBlock("content");
             $this->fillTabs();
             $this->fillMainContent();
             $this->fillMainMenu();
             $this->fillLightbox();
             $this->parseCurrentBlock();
         }
     }
     if ($part == "DEFAULT" or is_bool($part)) {
         $html = parent::get();
     } else {
         $html = parent::get($part);
     }
     // include the template output hook
     global $ilPluginAdmin;
     $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
     foreach ($pl_names as $pl) {
         $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
         $gui_class = $ui_plugin->getUIClassInstance();
         $resp = $gui_class->getHTML("", "template_show", array("tpl_id" => $this->tplIdentifier, "tpl_obj" => $this, "html" => $html));
         if ($resp["mode"] != ilUIHookPluginGUI::KEEP) {
             $html = $gui_class->modifyHTML($html, $resp);
         }
     }
     print $html;
     $this->handleReferer();
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:94,代码来源:class.ilTemplate.php

示例2: addJavaScript

 /**
  * Add javascript files that are necessary to run accordion
  */
 static function addJavaScript()
 {
     global $tpl;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initEvent();
     ilYuiUtil::initDom();
     ilYuiUtil::initAnimation();
     ilYuiUtil::initConnection();
     $tpl->addJavaScript("./Services/Accordion/js/accordion.js", true, 3);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:13,代码来源:class.ilAccordionGUI.php

示例3: getContent

 /**
  * Get Content.
  */
 function getContent()
 {
     global $lng, $tpl, $ilUser;
     include_once "./Services/YUI/classes/class.ilYuiUtil.php";
     ilYuiUtil::initEvent();
     ilYuiUtil::initDom();
     ilYuiUtil::initAnimation();
     $tpl->addJavaScript("./Services/JavaScript/js/Basic.js");
     $tpl->addJavaScript("Services/Form/js/Form.js");
     $this->tpl = new ilTemplate("tpl.property_form.html", true, true, "Services/Form");
     // check if form has not title and first item is a section header
     // -> use section header for title and remove section header
     // -> command buttons are presented on top
     $fi = $this->items[0];
     if ($this->getMode() == "std" && $this->getTitle() == "" && is_object($fi) && $fi->getType() == "section_header") {
         $this->setTitle($fi->getTitle());
         unset($this->items[0]);
     }
     // title icon
     if ($this->getTitleIcon() != "" && @is_file($this->getTitleIcon())) {
         $this->tpl->setCurrentBlock("title_icon");
         $this->tpl->setVariable("IMG_ICON", $this->getTitleIcon());
         $this->tpl->parseCurrentBlock();
     }
     // title
     if ($this->getTitle() != "") {
         // commands on top
         if (count($this->buttons) > 0 && $this->getShowTopButtons()) {
             // command buttons
             foreach ($this->buttons as $button) {
                 $this->tpl->setCurrentBlock("cmd2");
                 $this->tpl->setVariable("CMD", $button["cmd"]);
                 $this->tpl->setVariable("CMD_TXT", $button["text"]);
                 $this->tpl->parseCurrentBlock();
             }
             $this->tpl->setCurrentBlock("commands2");
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock("header");
         $this->tpl->setVariable("TXT_TITLE", $this->getTitle());
         $this->tpl->setVariable("LABEL", $this->getTopAnchor());
         $this->tpl->setVariable("TXT_DESCRIPTION", $this->getDescription());
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->touchBlock("item");
     // properties
     $this->required_text = false;
     foreach ($this->items as $item) {
         if ($item->getType() != "hidden") {
             $this->insertItem($item);
         }
     }
     // required
     if ($this->required_text && $this->getMode() == "std") {
         $this->tpl->setCurrentBlock("required_text");
         $this->tpl->setVariable("TXT_REQUIRED", $lng->txt("required_field"));
         $this->tpl->parseCurrentBlock();
     }
     // command buttons
     foreach ($this->buttons as $button) {
         $this->tpl->setCurrentBlock("cmd");
         $this->tpl->setVariable("CMD", $button["cmd"]);
         $this->tpl->setVariable("CMD_TXT", $button["text"]);
         $this->tpl->parseCurrentBlock();
     }
     // try to keep uploads even if checking input fails
     if ($this->getMultipart()) {
         $hash = $_POST["ilfilehash"];
         if (!$hash) {
             $hash = md5(uniqid(mt_rand(), true));
         }
         $fhash = new ilHiddenInputGUI("ilfilehash");
         $fhash->setValue($hash);
         $this->addItem($fhash);
     }
     // hidden properties
     $hidden_fields = false;
     foreach ($this->items as $item) {
         if ($item->getType() == "hidden") {
             $item->insert($this->tpl);
             $hidden_fields = true;
         }
     }
     if ($this->required_text || count($this->buttons) > 0 || $hidden_fields) {
         $this->tpl->setCurrentBlock("commands");
         $this->tpl->parseCurrentBlock();
     }
     if ($this->getMode() == "subform") {
         $this->tpl->touchBlock("sub_table");
     } else {
         $this->tpl->touchBlock("std_table");
         $this->tpl->setVariable('STD_TABLE_WIDTH', $this->getTableWidth());
     }
     return $this->tpl->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:98,代码来源:class.ilPropertyFormGUI.php


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