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


PHP ilPropertyFormGUI::setMode方法代码示例

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


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

示例1: getSubForm

 /**
  * Get sub form html
  *
  */
 final function getSubForm()
 {
     // subitems
     $pf = null;
     if (count($this->getSubItems()) > 0) {
         $pf = new ilPropertyFormGUI();
         $pf->setMode("subform");
         $pf->setItems($this->getSubItems());
     }
     return $pf;
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:15,代码来源:class.ilSubEnabledFormPropertyGUI.php

示例2: render

 protected function render($a_mode = '')
 {
     $tpl = new ilTemplate("tpl.prop_checkbox_group.html", true, true, "Services/Form");
     foreach ($this->getOptions() as $option) {
         // information text for option
         if ($option->getInfo() != "") {
             $tpl->setCurrentBlock("checkbox_option_desc");
             $tpl->setVariable("CHECKBOX_OPTION_DESC", $option->getInfo());
             $tpl->parseCurrentBlock();
         }
         if (count($option->getSubItems()) > 0) {
             $tpl->setCurrentBlock("checkbox_option_subform");
             $pf = new ilPropertyFormGUI();
             $pf->setMode("subform");
             $pf->setItems($option->getSubItems());
             $tpl->setVariable("SUB_FORM", $pf->getContent());
             $tpl->setVariable("SOP_ID", $this->getFieldId() . "_" . $option->getValue());
             if ($pf->getMultipart()) {
                 $this->getParentForm()->setMultipart(true);
             }
             $tpl->parseCurrentBlock();
             if ($pf->getMultipart()) {
                 $this->getParentForm()->setMultipart(true);
             }
         }
         $tpl->setCurrentBlock("prop_checkbox_option");
         if (!$this->getUseValuesAsKeys()) {
             $tpl->setVariable("POST_VAR", $this->getPostVar() . '[]');
             $tpl->setVariable("VAL_CHECKBOX_OPTION", $option->getValue());
         } else {
             $tpl->setVariable("POST_VAR", $this->getPostVar() . '[' . $option->getValue() . ']');
             $tpl->setVariable("VAL_CHECKBOX_OPTION", "1");
         }
         $tpl->setVariable("OP_ID", $this->getFieldId() . "_" . $option->getValue());
         $tpl->setVariable("FID", $this->getFieldId());
         if ($this->getDisabled() or $option->getDisabled()) {
             $tpl->setVariable('DISABLED', 'disabled="disabled" ');
         }
         if (is_array($this->getValue())) {
             if (!$this->getUseValuesAsKeys()) {
                 if (in_array($option->getValue(), $this->getValue())) {
                     $tpl->setVariable("CHK_CHECKBOX_OPTION", 'checked="checked"');
                 }
             } else {
                 $cval = $this->getValue();
                 if ($cval[$option->getValue()] == 1) {
                     $tpl->setVariable("CHK_CHECKBOX_OPTION", 'checked="checked"');
                 }
             }
         }
         $tpl->setVariable("TXT_CHECKBOX_OPTION", $option->getTitle());
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("ID", $this->getFieldId());
     return $tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:56,代码来源:class.ilCheckboxGroupInputGUI.php

示例3: render

 /**
  * Insert property html
  */
 function render()
 {
     $tpl = new ilTemplate("tpl.prop_radio.html", true, true, "Services/Form");
     foreach ($this->getOptions() as $option) {
         // information text for option
         if ($option->getInfo() != "") {
             $tpl->setCurrentBlock("radio_option_desc");
             $tpl->setVariable("RADIO_OPTION_DESC", $option->getInfo());
             $tpl->parseCurrentBlock();
         }
         if (count($option->getSubItems()) > 0) {
             if ($option->getValue() != $this->getValue()) {
                 // #10930
                 $tpl->setCurrentBlock("prop_radio_opt_hide");
                 $tpl->setVariable("HOP_ID", $this->getFieldId() . "_" . $option->getValue());
                 $tpl->parseCurrentBlock();
             }
             $tpl->setCurrentBlock("radio_option_subform");
             $pf = new ilPropertyFormGUI();
             $pf->setMode("subform");
             $pf->setItems($option->getSubItems());
             $tpl->setVariable("SUB_FORM", $pf->getContent());
             $tpl->setVariable("SOP_ID", $this->getFieldId() . "_" . $option->getValue());
             if ($pf->getMultipart()) {
                 $this->getParentForm()->setMultipart(true);
             }
             $tpl->parseCurrentBlock();
             if ($pf->getMultipart()) {
                 $this->getParentForm()->setMultipart(true);
             }
         }
         $tpl->setCurrentBlock("prop_radio_option");
         if (!$this->getDisabled()) {
             $tpl->setVariable("POST_VAR", $this->getPostVar());
         }
         $tpl->setVariable("VAL_RADIO_OPTION", $option->getValue());
         $tpl->setVariable("OP_ID", $this->getFieldId() . "_" . $option->getValue());
         $tpl->setVariable("FID", $this->getFieldId());
         if ($this->getDisabled() or $option->getDisabled()) {
             $tpl->setVariable('DISABLED', 'disabled="disabled" ');
         }
         if ($option->getValue() == $this->getValue()) {
             $tpl->setVariable("CHK_RADIO_OPTION", 'checked="checked"');
         }
         $tpl->setVariable("TXT_RADIO_OPTION", $option->getTitle());
         $tpl->parseCurrentBlock();
     }
     $tpl->setVariable("ID", $this->getFieldId());
     if ($this->getDisabled()) {
         $tpl->setVariable("HIDDEN_INPUT", $this->getHiddenTag($this->getPostVar(), $this->getValue()));
     }
     return $tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:56,代码来源:class.ilRadioGroupInputGUI.php


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