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


PHP ilAdvancedSelectionListGUI::setFormSelectMode方法代码示例

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


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

示例1: getHTML

 /**
  * Get HTML for navigation history
  */
 function getHTML()
 {
     global $ilNavigationHistory, $lng;
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $selection = new ilAdvancedSelectionListGUI();
     $selection->setFormSelectMode("url_ref_id", "ilNavHistorySelect", true, "goto.php?target=navi_request", "ilNavHistory", "ilNavHistoryForm", "_top", $lng->txt("go"), "ilNavHistorySubmit");
     $selection->setListTitle($lng->txt("last_visited"));
     $selection->setId("lastvisited");
     $selection->setSelectionHeaderClass("MMInactive");
     $selection->setHeaderIcon(ilAdvancedSelectionListGUI::NO_ICON);
     $selection->setItemLinkClass("small");
     $selection->setUseImages(true);
     include_once "./Services/Accessibility/classes/class.ilAccessKey.php";
     $selection->setAccessKey(ilAccessKey::LAST_VISITED);
     $items = $ilNavigationHistory->getItems();
     //$sel_arr = array(0 => "-- ".$lng->txt("last_visited")." --");
     reset($items);
     $cnt = 0;
     foreach ($items as $k => $item) {
         if ($cnt++ > 20) {
             break;
         }
         if (!isset($item["ref_id"]) || !isset($_GET["ref_id"]) || $item["ref_id"] != $_GET["ref_id"] || $k > 0) {
             $obj_id = ilObject::_lookupObjId($item["ref_id"]);
             $selection->addItem($item["title"], $item["ref_id"], $item["link"], ilObject::_getIcon($obj_id, "tiny", $item["type"]), $lng->txt("obj_" . $item["type"]), "_top");
         }
     }
     $html = $selection->getHTML();
     if ($html == "") {
         $selection->addItem($lng->txt("no_items"), "", "#", "", "", "_top");
         $selection->setUseImages(false);
         $html = $selection->getHTML();
     }
     return $html;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:38,代码来源:class.ilNavigationHistoryGUI.php

示例2: getLanguageSelection

 static function getLanguageSelection($a_in_topbar = false)
 {
     global $lng;
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $selection = new ilAdvancedSelectionListGUI();
     $selection->setFormSelectMode("change_lang_to", "ilLanguageSelection", true, "#", "ilNavHistory", "ilNavHistoryForm", "", $lng->txt("ok"), "ilLogin");
     //$selection->setListTitle($lng->txt("choose_language"));
     $selection->setListTitle($lng->txt("language"));
     $selection->setItemLinkClass("small");
     if ($a_in_topbar) {
         $selection->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_TOPBAR);
     }
     $languages = $lng->getInstalledLanguages();
     if (sizeof($languages) > 1) {
         foreach ($languages as $lang_key) {
             $base = substr($_SERVER["REQUEST_URI"], strrpos($_SERVER["REQUEST_URI"], "/") + 1);
             $base = preg_replace("/&*lang=[a-z]{2}&*/", "", $base);
             $link = ilUtil::appendUrlParameterString($base, "lang=" . $lang_key);
             $link = str_replace("?&", "?", $link);
             $selection->addItem($lng->_lookupEntry($lang_key, "meta", "meta_l_" . $lang_key), $lang_key, $link, "", "", "");
         }
         return $selection->getHTML();
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:24,代码来源:class.ilMainMenuGUI.php

示例3: getCharStyleSelector

 /**
  * Get character style selector
  */
 static function getCharStyleSelector($a_par_type, $a_use_callback = true)
 {
     global $lng;
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $selection = new ilAdvancedSelectionListGUI();
     $selection->setFormSelectMode("char_characteristic", "", false, "", "", "", "", "", "", "");
     $selection->setId("char_style_selection");
     $selection->setSelectionHeaderClass("ilEditSubmit");
     $selection->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
     //$selection->setSelectedValue($a_selected);
     $selection->setUseImages(false);
     $selection->setOnClickMode(ilAdvancedSelectionListGUI::ON_ITEM_CLICK_NOP);
     if ($a_use_callback) {
         $selection->setSelectCallback("ilCOPage.setCharacterClass");
     }
     //$chars = $a_chars;
     //$title_char = ($chars[$a_selected] != "")
     //	? $chars[$a_selected]
     //	: $a_selected;
     $selection->setListTitle("&nbsp;<i>A</i>");
     /*if ($chars[$a_seleted] == "" && ($a_seleted != ""))
     		{
     			$chars = array_merge(array($a_seleted => $a_seleted),
     				$chars);
     		}*/
     $chars = array("Comment" => array("code" => "com", "txt" => $lng->txt("cont_char_style_com")), "Quotation" => array("code" => "quot", "txt" => $lng->txt("cont_char_style_quot")), "Accent" => array("code" => "acc", "txt" => $lng->txt("cont_char_style_acc")), "Code" => array("code" => "code", "txt" => $lng->txt("cont_char_style_code")));
     foreach ($chars as $key => $char) {
         if (ilPageEditorSettings::lookupSettingByParentType($a_par_type, "active_" . $char["code"], true)) {
             $t = "text_inline";
             $tag = "span";
             switch ($key) {
                 case "Code":
                     $tag = "code";
                     break;
             }
             $html = '<' . $tag . ' class="ilc_' . $t . '_' . $key . '" style="font-size:90%; margin-top:2px; margin-bottom:2px; position:static;">' . $char["txt"] . "</" . $tag . ">";
             // this next line is very important for IE. The real onclick event is on the surrounding <tr> of the
             // advanced selection list. But it is impossible to prevent the tr-event from removing the focus
             // on tiny withouth the following line, that receives the click event before and stops the faulty default
             // bevaviour of IE, see bug report #8723
             $html = '<a class="nostyle" style="display:block;" href="#" onclick="return false;">' . $html . "</a>";
             $selection->addItem($char["txt"], $key, "", "", $key, "", $html);
         }
     }
     return $selection->getHTML();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:49,代码来源:class.ilPCParagraphGUI.php

示例4: insert

 /**
  * Insert property html
  *
  * @return	int	Size
  */
 function insert(&$a_tpl)
 {
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $selection = new ilAdvancedSelectionListGUI();
     $selection->setFormSelectMode($this->getPostVar(), "", false, "", "", "", "", "", "", "");
     $selection->setId($this->getPostVar());
     $selection->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
     $selection->setSelectedValue($this->getValue());
     $selection->setUseImages(false);
     $selection->setOnClickMode(ilAdvancedSelectionListGUI::ON_ITEM_CLICK_FORM_SELECT);
     foreach ($this->getOptions() as $option) {
         $selection->addItem($option["txt"], $option["value"], "", "", $option["value"], "", $option["html"]);
         if ($this->getValue() == $option["value"]) {
             $selection->setListTitle($option["txt"]);
         }
     }
     $a_tpl->setCurrentBlock("prop_generic");
     $a_tpl->setVariable("PROP_GENERIC", $selection->getHTML());
     $a_tpl->parseCurrentBlock();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:25,代码来源:class.ilAdvSelectInputGUI.php


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