本文整理汇总了PHP中HTML_QuickForm_text::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP HTML_QuickForm_text::__construct方法的具体用法?PHP HTML_QuickForm_text::__construct怎么用?PHP HTML_QuickForm_text::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HTML_QuickForm_text
的用法示例。
在下文中一共展示了HTML_QuickForm_text::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Class constructor
*
* @param string $elementName (optional)Input field name attribute
* @param string $elementLabel (optional)Input field label in form
* @param array $options (optional)Autocomplete options
* @param mixed $attributes (optional)Either a typical HTML attribute string
* or an associative array. Date format is passed along the attributes.
* @access public
* @return void
*/
public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null)
{
parent::__construct($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true;
$this->_type = 'autocomplete';
if (isset($options)) {
$this->setOptions($options);
}
}
示例2: __construct
/**
* Constructor
*/
public function __construct($elementName = null, $elementLabel = null, $attributes = null)
{
if (!isset($attributes['id'])) {
$attributes['id'] = $elementName;
}
$attributes['class'] = 'form-control';
parent::__construct($elementName, $elementLabel, $attributes);
$this->_appendName = true;
$this->_type = 'date_range_picker';
}
示例3: __construct
/**
* Constructor of Url class
* @param type $elementName
* @param type $elementLabel
* @param type $attributes
*/
public function __construct($elementName = null, $elementLabel = null, $attributes = null)
{
if (!isset($attributes['id'])) {
$attributes['id'] = $elementName;
}
$attributes['type'] = 'url';
$attributes['class'] = 'form-control';
parent::__construct($elementName, $elementLabel, $attributes);
$this->setType('url');
}
示例4: __construct
/**
* Constructor
*
* @param string $elementName Element name
* @param mixed $elementLabel Label(s) for an element
* @param mixed $attributes Either a typical HTML attribute string or an associative array.
* @param array $options data which need to be posted.
*/
public function __construct($elementName = null, $elementLabel = null, $attributes = null, $options = null)
{
global $CFG;
require_once "{$CFG->dirroot}/repository/lib.php";
$options = (array) $options;
foreach ($options as $name => $value) {
$this->_options[$name] = $value;
}
if (!isset($this->_options['usefilepicker'])) {
$this->_options['usefilepicker'] = true;
}
parent::__construct($elementName, $elementLabel, $attributes);
}
示例5: __construct
/**
* constructor
*
* @param string $elementName (optional) name of the text field
* @param string $elementLabel (optional) text field label
* @param string $attributes (optional) Either a typical HTML attribute string or an associative array
*/
public function __construct($elementName = null, $elementLabel = null, $attributes = null)
{
parent::__construct($elementName, $elementLabel, $attributes);
}
示例6: __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
* @throws
*/
public function __construct($elementName = null, $elementLabel = null, $attributes = null)
{
$attributes['class'] = isset($attributes['class']) ? $attributes['class'] : 'form-control';
parent::__construct($elementName, $elementLabel, $attributes);
$this->setType('password');
}
示例7: MoodleQuickForm_tccolourpopup
public function MoodleQuickForm_tccolourpopup($elementname = null, $elementlabel = null, $attributes = null, $options = null)
{
parent::__construct($elementname, $elementlabel, $attributes);
$this->_type = 'colourtext';
}