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


PHP moodleform::setAdvanced方法代码示例

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


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

示例1: setupForm

 /**
  * Adds controls specific to this filter in the form.
  * @param moodleform $mform a MoodleForm object to setup
  */
 public function setupForm(&$mform)
 {
     $choices = array('' => get_string('anyvalue', 'filters')) + $this->_options;
     $mform->addElement('select', $this->_name, $this->_label, $choices);
     if ($this->_advanced) {
         $mform->setAdvanced($this->_name);
     }
 }
开发者ID:evltuma,项目名称:moodle,代码行数:12,代码来源:simpleselect.php

示例2: setupForm

 /**
  * Adds controls specific to this filter in the form.
  * @param moodleform $mform a MoodleForm object to setup
  */
 public function setupForm(&$mform)
 {
     $objs = array();
     $objs[] = $mform->createElement('select', $this->_name . '_rl', null, $this->get_roles());
     $objs[] = $mform->createElement('select', $this->_name . '_ct', null, $this->get_course_categories());
     $objs[] = $mform->createElement('text', $this->_name, null);
     $grp =& $mform->addElement('group', $this->_name . '_grp', $this->_label, $objs, '', false);
     $mform->setType($this->_name, PARAM_TEXT);
     if ($this->_advanced) {
         $mform->setAdvanced($this->_name . '_grp');
     }
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:16,代码来源:courserole.php

示例3: setupForm

 /**
  * Adds controls specific to this filter in the form.
  *
  * @param moodleform $mform a MoodleQuickForm object in which element will be added
  */
 public function setupForm(&$mform)
 {
     $mform->addElement('checkbox', $this->_name, $this->_label, '');
     if ($this->_advanced) {
         $mform->setAdvanced($this->_name);
     }
     // Check if disable if options are set. if yes then set rules.
     if (!empty($this->disableelements) && is_array($this->disableelements)) {
         foreach ($this->disableelements as $disableelement) {
             $mform->disabledIf($disableelement, $this->_name, 'checked');
         }
     }
 }
开发者ID:evltuma,项目名称:moodle,代码行数:18,代码来源:checkbox.php

示例4: setupForm

 /**
  * Adds controls specific to this filter in the form.
  * @param moodleform $mform a MoodleForm object to setup
  */
 public function setupForm(&$mform)
 {
     $objs = array();
     $objs[] = $mform->createElement('select', $this->_name . '_op', null, $this->get_operators());
     $objs[] = $mform->createElement('select', $this->_name, null, $this->_options);
     $grp =& $mform->addElement('group', $this->_name . '_grp', $this->_label, $objs, '', false);
     $mform->disabledIf($this->_name, $this->_name . '_op', 'eq', 0);
     if (!is_null($this->_default)) {
         $mform->setDefault($this->_name, $this->_default);
     }
     if ($this->_advanced) {
         $mform->setAdvanced($this->_name . '_grp');
     }
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:18,代码来源:select.php

示例5: setupForm

 /**
  * Adds controls specific to this filter in the form.
  *
  * @param moodleform $mform a MoodleQuickForm object in which element will be added
  */
 public function setupForm(&$mform)
 {
     $objs = array();
     $objs[] = $mform->createElement('checkbox', $this->_name, null, '');
     $grp = $mform->addElement('group', $this->_name . '_grp', $this->_label, $objs, '', false);
     if ($this->_advanced) {
         $mform->setAdvanced($this->_name . '_grp');
     }
     // Check if disable if options are set. if yes then set rules.
     if (!empty($this->disableelements) && is_array($this->disableelements)) {
         foreach ($this->disableelements as $disableelement) {
             $mform->disabledIf($disableelement, $this->_name, 'checked');
         }
     }
 }
开发者ID:janaece,项目名称:globalclassroom4_clean,代码行数:20,代码来源:checkbox.php

示例6: setupForm

 /**
  * Adds controls specific to this filter in the form.
  * @param moodleform $mform a MoodleForm object to setup
  */
 public function setupForm(&$mform)
 {
     $objs = array();
     $objs['limiter'] = $mform->createElement('select', $this->_name . '_op', null, $this->get_operators());
     $objs['limiter']->setLabel(get_string('limiterfor', 'filters', $this->_label));
     $objs['country'] = $mform->createElement('select', $this->_name, null, $this->_options);
     $objs['country']->setLabel(get_string('valuefor', 'filters', $this->_label));
     $grp =& $mform->addElement('group', $this->_name . '_grp', $this->_label, $objs, '', false);
     $mform->disabledIf($this->_name, $this->_name . '_op', 'eq', 0);
     if (!is_null($this->_default)) {
         $mform->setDefault($this->_name, $this->_default);
     }
     if ($this->_advanced) {
         $mform->setAdvanced($this->_name . '_grp');
     }
 }
开发者ID:pzhu2004,项目名称:moodle,代码行数:20,代码来源:select.php


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