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


PHP ilAdvancedSelectionListGUI::setSelectedValue方法代码示例

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


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

示例1: getStyleSelector

 /**
  * Get style selector
  */
 static function getStyleSelector($a_selected, $a_chars, $a_use_callback = false)
 {
     include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
     $selection = new ilAdvancedSelectionListGUI();
     $selection->setFormSelectMode("par_characteristic", "", false, "", "", "", "", "", "", "");
     $selection->setId("style_selection");
     $selection->setSelectionHeaderClass("ilEditSubmit ilTinyMenuDropDown");
     $selection->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
     $selection->setSelectedValue($a_selected);
     $selection->setUseImages(false);
     $selection->setOnClickMode(ilAdvancedSelectionListGUI::ON_ITEM_CLICK_FORM_SELECT);
     if ($a_use_callback) {
         $selection->setSelectCallback("ilCOPage.setParagraphClass");
     }
     $chars = $a_chars;
     $title_char = $chars[$a_selected] != "" ? $chars[$a_selected] : $a_selected;
     $selection->setListTitle($title_char);
     if ($chars[$a_seleted] == "" && $a_seleted != "") {
         $chars = array_merge(array($a_seleted => $a_seleted), $chars);
     }
     foreach ($chars as $char => $char_lang) {
         $t = "text_block";
         $tag = "div";
         switch ($char) {
             case "Headline1":
                 $t = "heading1";
                 $tag = "h1";
                 break;
             case "Headline2":
                 $t = "heading2";
                 $tag = "h2";
                 break;
             case "Headline3":
                 $t = "heading3";
                 $tag = "h3";
                 break;
         }
         $html = '<' . $tag . ' class="ilc_' . $t . '_' . $char . '" style="margin-top:2px; margin-bottom:2px; text-indent:0px; position:static;">' . $char_lang . "</" . $tag . ">";
         $selection->addItem($char_lang, $char, "", "", $char, "", $html);
     }
     return $selection->getHTML();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:45,代码来源:class.ilPCParagraphGUI.php

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