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


PHP HTML_QuickForm_group::__construct方法代码示例

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


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

示例1: __construct

 /**
  * Class constructor
  *
  * The following keys may appear in $options array:
  * - 'language': date language
  * - 'format': Format of the date, based on PHP's date() function.
  *   The following characters are currently recognised in format string:
  *   <pre>
  *       D => Short names of days
  *       l => Long names of days
  *       d => Day numbers
  *       M => Short names of months
  *       F => Long names of months
  *       m => Month numbers
  *       Y => Four digit year
  *       y => Two digit year
  *       h => 12 hour format
  *       H => 23 hour  format
  *       i => Minutes
  *       s => Seconds
  *       a => am/pm
  *       A => AM/PM
  *   </pre>
  * - 'minYear': Minimum year in year select
  * - 'maxYear': Maximum year in year select
  * - 'addEmptyOption': Should an empty option be added to the top of
  *    each select box?
  * - 'emptyOptionValue': The value passed by the empty option.
  * - 'emptyOptionText': The text displayed for the empty option.
  * - 'optionIncrement': Step to increase the option values by (works for 'i' and 's')
  *
  * @access   public
  * @param    string  Element's name
  * @param    mixed   Label(s) for an element
  * @param    array   Options to control the element's display
  * @param    mixed   Either a typical HTML attribute string or an associative array
  */
 public function __construct($elementName = null, $elementLabel = null, $options = array(), $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     $this->_appendName = true;
     $this->_type = 'date';
     // Added by Ivan Tcholakov, 16-MAR-2010.
     $current_year = intval(api_get_local_time());
     $this->_options['minYear'] = $current_year - 9;
     $this->_options['maxYear'] = $current_year + 1;
     //
     // set the options, do not bother setting bogus ones
     if (is_array($options)) {
         foreach ($options as $name => $value) {
             if ('language' == $name) {
                 $this->_options['language'] = isset($this->_locale[$value]) ? $value : 'en';
             } elseif (isset($this->_options[$name])) {
                 if (is_array($value) && is_array($this->_options[$name])) {
                     $this->_options[$name] = @array_merge($this->_options[$name], $value);
                 } else {
                     $this->_options[$name] = $value;
                 }
             }
         }
     }
 }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:63,代码来源:date.php

示例2:

 /**
  * Class constructor
  *
  * @param     string    $elementName    (optional)Input field name attribute
  * @param     string    $elementLabel   (optional)Input field label in form
  * @param     mixed     $attributes     (optional)Either a typical HTML attribute string
  *                                      or an associative array. Date format is passed along the attributes.
  * @param     mixed     $separator      (optional)Use a string for one separator,
  *                                      use an array to alternate the separators.
  * @access    public
  * @return    void
  */
 function __construct($elementName = null, $elementLabel = null, $attributes = null, $separator = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     if (isset($separator)) {
         $this->_separator = $separator;
     }
     $this->_type = 'hierselect';
     $this->_appendName = true;
 }
开发者ID:hostinger,项目名称:revive-adserver,代码行数:22,代码来源:hierselect.php

示例3: array

 /**
  * Class constructor
  *
  * The following keys may appear in $options array:
  * - 'language': date language
  * - 'format': Format of the date, based on PHP's date() function.
  *   The following characters are currently recognised in format string:
  *   <pre>
  *       D => Short names of days
  *       l => Long names of days
  *       d => Day numbers
  *       M => Short names of months
  *       F => Long names of months
  *       m => Month numbers
  *       Y => Four digit year
  *       y => Two digit year
  *       h => 12 hour format
  *       H => 23 hour  format
  *       i => Minutes
  *       s => Seconds
  *       a => am/pm
  *       A => AM/PM
  *   </pre>
  * - 'minYear': Minimum year in year select
  * - 'maxYear': Maximum year in year select
  * - 'addEmptyOption': Should an empty option be added to the top of
  *    each select box?
  * - 'emptyOptionValue': The value passed by the empty option.
  * - 'emptyOptionText': The text displayed for the empty option.
  * - 'optionIncrement': Step to increase the option values by (works for 'i' and 's')
  *
  * @access   public
  * @param    string  Element's name
  * @param    mixed   Label(s) for an element
  * @param    array   Options to control the element's display
  * @param    mixed   Either a typical HTML attribute string or an associative array
  */
 function __construct($elementName = null, $elementLabel = null, $options = array(), $attributes = null)
 {
     parent::__construct($elementName, $elementLabel, $attributes);
     $this->_persistantFreeze = true;
     $this->_appendName = true;
     $this->_type = 'date';
     // set the options, do not bother setting bogus ones
     if (is_array($options)) {
         foreach ($options as $name => $value) {
             if ('language' == $name) {
                 $this->_options['language'] = isset($this->_locale[$value]) ? $value : 'en';
             } elseif (isset($this->_options[$name])) {
                 if (is_array($value) && is_array($this->_options[$name])) {
                     $this->_options[$name] = @array_merge($this->_options[$name], $value);
                 } else {
                     $this->_options[$name] = $value;
                 }
             }
         }
     }
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:58,代码来源:date.php

示例4: __construct

 /**
  * constructor
  *
  * @param string $elementName (optional) name of the group
  * @param string $elementLabel (optional) group label
  * @param array $elements (optional) array of HTML_QuickForm_element elements to group
  * @param string $separator (optional) string to seperate elements.
  * @param string $appendName (optional) string to appened to grouped elements.
  */
 public function __construct($elementName = null, $elementLabel = null, $elements = null, $separator = null, $appendName = true)
 {
     parent::__construct($elementName, $elementLabel, $elements, $separator, $appendName);
 }
开发者ID:lucaboesch,项目名称:moodle,代码行数:13,代码来源:group.php


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