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


PHP ilObjStyleSheet::_getStyleParameterInputType方法代码示例

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


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

示例1: initTagStyleForm

 /**
  * Init tag style editing form
  *
  * @param        int        $a_mode        Form Edit Mode (IL_FORM_EDIT | IL_FORM_CREATE)
  */
 public function initTagStyleForm($a_mode, $a_cur_tag)
 {
     global $lng, $ilCtrl;
     $ilCtrl->saveParameter($this, array("mq_id"));
     include_once "Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form_gui = new ilPropertyFormGUI();
     $avail_pars = $this->object->getAvailableParameters();
     $groups = $this->object->getStyleParameterGroups();
     // output select lists
     foreach ($groups as $k => $group) {
         // filter groups of properties that should only be
         // displayed with matching tag
         $filtered_groups = ilObjStyleSheet::_getFilteredGroups();
         if (is_array($filtered_groups[$k]) && !in_array($a_cur_tag, $filtered_groups[$k])) {
             continue;
         }
         $sh = new ilFormSectionHeaderGUI();
         $sh->setTitle($lng->txt("sty_" . $k));
         $this->form_gui->addItem($sh);
         foreach ($group as $par) {
             $basepar = explode(".", $par);
             $basepar = $basepar[0];
             $var = str_replace("-", "_", $basepar);
             $up_par = strtoupper($var);
             switch (ilObjStyleSheet::_getStyleParameterInputType($par)) {
                 case "select":
                     $sel_input = new ilSelectInputGUI($lng->txt("sty_" . $var), $basepar);
                     $options = array("" => "");
                     foreach ($avail_pars[$par] as $p) {
                         $options[$p] = $p;
                     }
                     $sel_input->setOptions($options);
                     $this->form_gui->addItem($sel_input);
                     break;
                 case "text":
                     $text_input = new ilTextInputGUI($lng->txt("sty_" . $var), $basepar);
                     $text_input->setMaxLength(200);
                     $text_input->setSize(20);
                     $this->form_gui->addItem($text_input);
                     break;
                 case "fontsize":
                     include_once "./Services/Style/classes/class.ilFontSizeInputGUI.php";
                     $fs_input = new ilFontSizeInputGUI($lng->txt("sty_" . $var), $basepar);
                     $this->form_gui->addItem($fs_input);
                     break;
                 case "numeric_no_perc":
                 case "numeric":
                     include_once "./Services/Style/classes/class.ilNumericStyleValueInputGUI.php";
                     $num_input = new ilNumericStyleValueInputGUI($lng->txt("sty_" . $var), $basepar);
                     if (ilObjStyleSheet::_getStyleParameterInputType($par) == "numeric_no_perc") {
                         $num_input->setAllowPercentage(false);
                     }
                     $this->form_gui->addItem($num_input);
                     break;
                 case "percentage":
                     $per_input = new ilNumberInputGUI($lng->txt("sty_" . $var), $basepar);
                     $per_input->setMinValue(0);
                     $per_input->setMaxValue(100);
                     $per_input->setMaxLength(3);
                     $per_input->setSize(3);
                     $this->form_gui->addItem($per_input);
                     break;
                 case "color":
                     //include_once("./Services/Style/classes/class.ilNumericStyleValueInputGUI.php");
                     $col_input = new ilColorPickerInputGUI($lng->txt("sty_" . $var), $basepar);
                     $col_input->setDefaultColor("");
                     $col_input->setAcceptNamedColors(true);
                     $this->form_gui->addItem($col_input);
                     break;
                 case "trbl_numeric":
                     include_once "./Services/Style/classes/class.ilTRBLNumericStyleValueInputGUI.php";
                     $num_input = new ilTRBLNumericStyleValueInputGUI($lng->txt("sty_" . $var), $basepar);
                     if (ilObjStyleSheet::_getStyleParameterInputType($par) == "trbl_numeric_no_perc") {
                         $num_input->setAllowPercentage(false);
                     }
                     $this->form_gui->addItem($num_input);
                     break;
                 case "border_width":
                     include_once "./Services/Style/classes/class.ilTRBLBorderWidthInputGUI.php";
                     $bw_input = new ilTRBLBorderWidthInputGUI($lng->txt("sty_" . $var), $basepar);
                     $this->form_gui->addItem($bw_input);
                     break;
                 case "border_style":
                     include_once "./Services/Style/classes/class.ilTRBLBorderStyleInputGUI.php";
                     $bw_input = new ilTRBLBorderStyleInputGUI($lng->txt("sty_" . $var), $basepar);
                     $this->form_gui->addItem($bw_input);
                     break;
                 case "trbl_color":
                     include_once "./Services/Style/classes/class.ilTRBLColorPickerInputGUI.php";
                     $col_input = new ilTRBLColorPickerInputGUI($lng->txt("sty_" . $var), $basepar);
                     $col_input->setAcceptNamedColors(true);
                     $this->form_gui->addItem($col_input);
                     break;
                 case "background_image":
                     include_once "./Services/Style/classes/class.ilBackgroundImageInputGUI.php";
//.........这里部分代码省略.........
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilObjStyleSheetGUI.php


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