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


PHP HTML_QuickForm_input::__construct方法代码示例

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


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

示例1:

 /**
  * Class constructor
  *
  * @param     string    $elementName    (optional)Input field name attribute
  * @param     string    $value          (optional)Input field value
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string
  *                                      or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  */
 function __construct($elementName = null, $value = null, $attributes = null)
 {
     parent::__construct($elementName, null, $attributes);
     $this->_persistantFreeze = false;
     $this->setValue($value);
     $this->setType('button');
 }
开发者ID:hostinger,项目名称:revive-adserver,代码行数:18,代码来源:button.php

示例2: __construct

 /**
  * Class constructor
  * 
  * @param     string    $elementName    (optional)Input field name attribute
  * @param     string    $elementLabel   (optional)Input field value
  * @param     string    $text           (optional)Checkbox display text
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string 
  *                                      or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  */
 public function __construct($elementName = null, $elementLabel = null, $text = '', $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     $this->_text = $text;
     $this->setType('checkbox');
     $this->updateAttributes(array('value' => 1));
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:20,代码来源:checkbox.php

示例3: __construct

 /**
  * constructor
  *
  * @param string $elementName (optional) name of the recaptcha element
  * @param string $elementLabel (optional) label for recaptcha element
  * @param mixed $attributes (optional) Either a typical HTML attribute string
  *              or an associative array
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null)
 {
     global $CFG;
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_type = 'recaptcha';
     if (is_https()) {
         $this->_https = true;
     } else {
         $this->_https = false;
     }
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:19,代码来源:recaptcha.php

示例4: __construct

 /**
  * Class constructor
  *
  * @param     string    Input field name attribute
  * @param     mixed     Label(s) for a field
  * @param     string    Text to display near the radio
  * @param     string    Input field value
  * @param     mixed     Either a typical HTML attribute string or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  */
 public function __construct($elementName = null, $elementLabel = null, $text = null, $value = null, $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     if (isset($value)) {
         $this->setValue($value);
     }
     $this->_persistantFreeze = true;
     $this->setType('radio');
     $this->_text = $text;
     $this->_generateId();
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:23,代码来源:radio.php

示例5: HTML_QuickForm_checkbox

 /**
  * Class constructor
  *
  * @param     string    $elementName    (optional)Input field name attribute
  * @param     string    $elementLabel   (optional)Input field value
  * @param     string    $text           (optional)Checkbox display text
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string
  *                                      or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  */
 public function HTML_QuickForm_checkbox($elementName = null, $elementLabel = null, $text = '', $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     $this->_text = $text;
     $this->setType('checkbox');
     if (!isset($attributes['value'])) {
         $this->updateAttributes(array('value' => 1));
     } else {
         $this->updateAttributes(array('value' => $attributes['value']));
     }
     $this->_generateId();
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:25,代码来源:checkbox.php

示例6: __construct

 /**
  * @param string $name input name example 'submit'
  * @param string $text button text to show
  * @param string $icon icons based in font-awesome
  * @param string $style i.e default|primary|success|info|warning|danger|link
  * @param string $size large|default|small|extra-small
  * @param string $class
  * @param array $attributes
  */
 public function __construct($name, $text, $icon = 'check', $style = 'default', $size = 'default', $class = null, $attributes = array())
 {
     $this->setIcon($icon);
     $this->setStyle($style);
     $this->setSize($size);
     $this->setClass($class);
     $columnsSize = isset($attributes['cols-size']) ? $attributes['cols-size'] : null;
     $this->setColumnsSize($columnsSize);
     parent::__construct($name, null, $attributes);
     $this->_persistantFreeze = false;
     $this->setValue($text);
     $this->setType('submit');
 }
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:22,代码来源:button.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param string $elementName (optional) name of the listing.
  * @param string $elementLabel (optional) listing label.
  * @param array $attributes (optional) Either a typical HTML attribute string or an associative array.
  * @param array $options set of options to initalize listing.
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null, $options = array())
 {
     $this->_type = 'listing';
     if (!empty($options['items'])) {
         $this->items = $options['items'];
     }
     if (!empty($options['showall'])) {
         $this->showall = $options['showall'];
     } else {
         $this->showall = get_string('showall');
     }
     if (!empty($options['hideall'])) {
         $this->hideall = $options['hideall'];
     } else {
         $this->hideall = get_string('hide');
     }
     parent::__construct($elementName, $elementLabel, $attributes);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:26,代码来源:listing.php

示例8: __construct

 /**
  * Class constructor
  *
  * @param     string    Input field name attribute
  * @param     mixed     Label(s) for a field
  * @param     string    Text to display near the radio
  * @param     string    Input field value
  * @param     mixed     Either a typical HTML attribute string or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  */
 public function __construct($elementName = null, $elementLabel = null, $text = null, $value = null, $attributes = null)
 {
     $this->labelClass = isset($attributes['label-class']) ? $attributes['label-class'] : '';
     $this->radioClass = isset($attributes['radio-class']) ? $attributes['radio-class'] : 'radio';
     if (isset($attributes['label-class'])) {
         unset($attributes['label-class']);
     }
     if (isset($attributes['radio-class'])) {
         unset($attributes['radio-class']);
     }
     parent::__construct($elementName, $elementLabel, $attributes);
     if (isset($value)) {
         $this->setValue($value);
     }
     $this->_persistantFreeze = true;
     $this->setType('radio');
     $this->_text = $text;
     $this->_generateId();
 }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:radio.php

示例9: __construct

 /**
  * Class constructor
  *
  * @param string $elementName    (optional)Input field name attribute
  * @param string $elementLabel   (optional)Input field label
  * @param mixed  $attributes     (optional)Either a typical HTML attribute string
  *                                      or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = array())
 {
     if (is_array($attributes) || empty($attributes)) {
         $attributes['class'] = 'form-control';
     }
     $inputSize = isset($attributes['input-size']) ? $attributes['input-size'] : null;
     $this->setInputSize($inputSize);
     $columnsSize = isset($attributes['cols-size']) ? $attributes['cols-size'] : null;
     $this->setColumnsSize($columnsSize);
     $icon = isset($attributes['icon']) ? $attributes['icon'] : null;
     $this->setIcon($icon);
     if (!empty($inputSize)) {
         unset($attributes['input-size']);
     }
     if (!empty($icon)) {
         unset($attributes['icon']);
     }
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     $this->setType('text');
 }
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:32,代码来源:text.php

示例10: __construct

 /**
  * Class constructor
  *
  * @param     string    $elementName    (optional)Input field name attribute
  * @param     string    $elementLabel   (optional)Input field value
  * @param     string    $text           (optional)Checkbox display text
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string
  *                                      or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  */
 public function __construct($elementName = null, $elementLabel = null, $text = '', $attributes = null)
 {
     $this->labelClass = isset($attributes['label-class']) ? $attributes['label-class'] : '';
     $this->checkboxClass = isset($attributes['checkbox-class']) ? $attributes['checkbox-class'] : 'checkbox';
     if (isset($attributes['label-class'])) {
         unset($attributes['label-class']);
     }
     if (isset($attributes['checkbox-class'])) {
         unset($attributes['checkbox-class']);
     }
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     $this->_text = $text;
     $this->setType('checkbox');
     if (!isset($attributes['value'])) {
         $this->updateAttributes(array('value' => 1));
     } else {
         $this->updateAttributes(array('value' => $attributes['value']));
     }
     $this->_generateId();
 }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:33,代码来源:checkbox.php

示例11: __construct

 /**
  * Constructor
  *
  * @param string $elementName (optional) name of the filepicker
  * @param string $elementLabel (optional) filepicker label
  * @param array $attributes (optional) Either a typical HTML attribute string
  *              or an associative array
  * @param array $options set of options to initalize filepicker
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null, $options = null)
 {
     global $CFG, $PAGE;
     $options = (array) $options;
     foreach ($options as $name => $value) {
         if (array_key_exists($name, $this->_options)) {
             $this->_options[$name] = $value;
         }
     }
     if (empty($options['return_types'])) {
         $this->_options['return_types'] = FILE_INTERNAL;
     }
     $fpmaxbytes = 0;
     if (!empty($options['maxbytes'])) {
         $fpmaxbytes = $options['maxbytes'];
     }
     $coursemaxbytes = 0;
     if (!empty($PAGE->course->maxbytes)) {
         $coursemaxbytes = $PAGE->course->maxbytes;
     }
     $this->_options['maxbytes'] = get_user_max_upload_file_size($PAGE->context, $CFG->maxbytes, $coursemaxbytes, $fpmaxbytes);
     $this->_type = 'filepicker';
     parent::__construct($elementName, $elementLabel, $attributes);
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:33,代码来源:filepicker.php

示例12: __construct

 /**
  * Class constructor
  * 
  * @param     string    $elementName    (optional)Input field name attribute
  * @param     string    $elementLabel   (optional)Input field label
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string 
  *                                      or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     $this->setType('text');
 }
开发者ID:gabrielrosset,项目名称:moodle,代码行数:17,代码来源:text.php

示例13: __construct

 /**
  * Class constructor
  * 
  * @param     string    $elementName    (optional)Element name attribute
  * @param     string    $src            (optional)Image source
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string 
  *                                      or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  */
 public function __construct($elementName = null, $src = '', $attributes = null)
 {
     parent::__construct($elementName, null, $attributes);
     $this->setType('image');
     $this->setSource($src);
 }
开发者ID:evltuma,项目名称:moodle,代码行数:17,代码来源:image.php

示例14: __construct

 /**
  * Class constructor
  * 
  * @param     string    $elementName    (optional)Input field name attribute
  * @param     string    $elementLabel   (optional)Input field label
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string 
  *                                      or an associative array
  * @since     1.0
  * @access    public
  * @return    void
  * @throws    
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->setType('password');
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:17,代码来源:password.php

示例15: __construct

 /**
  * Class constructor
  *
  * @param string $elementName Input field name attribute
  * @param mixed $elementLabel Label(s) for the input field
  * @param mixed $attributes Either a typical HTML attribute string or an associative array
  */
 public function __construct($elementName = null, $elementLabel = null, $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->gradingattributes = $attributes;
 }
开发者ID:anawu2006,项目名称:PeerLearning,代码行数:12,代码来源:grading.php


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