本文整理汇总了PHP中FormControl::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP FormControl::__construct方法的具体用法?PHP FormControl::__construct怎么用?PHP FormControl::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormControl
的用法示例。
在下文中一共展示了FormControl::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($name, $storage = 'null:null', array $properties = array(), array $settings = array())
{
$this->settings['error_wrap'] = function ($output, $errors) {
return sprintf('<ol class="_control_error_list"><li>%2$s</li></ol>', $output, implode('</li><li>', $errors));
};
parent::__construct($name, $storage, $properties, $settings);
}
示例2: __construct
public function __construct($forcedValue = NULL)
{
parent::__construct();
$this->control->type = 'hidden';
$this->value = (string) $forcedValue;
$this->forcedValue = $forcedValue;
}
示例3: __construct
public function __construct($forcedValue = NULL)
{
parent::__construct();
$this->control->type = 'hidden';
$this->control->data['nette-rules'] = FALSE;
$this->value = (string) $forcedValue;
$this->forcedValue = $forcedValue;
}
示例4: __construct
/**
* @param string label
* @param int width of the control
* @param int maximum number of characters the user may enter
*/
public function __construct($label, $format = null)
{
parent::__construct($label);
if (null === $format) {
$format = self::$defaultFormat;
}
$this->format = $format;
}
示例5: __construct
/**
* @param string label
* @param array items from which to choose
* @param int number of rows that should be visible
*/
public function __construct($label = NULL, array $items = NULL, $size = NULL)
{
parent::__construct($label);
$this->control->setName('select');
$this->control->size = $size > 1 ? (int) $size : NULL;
if ($items !== NULL) {
$this->setItems($items);
}
}
示例6: __construct
/**
* @param string label
* @param array options from which to choose
*/
public function __construct($label = NULL, array $items = NULL)
{
parent::__construct($label);
$this->control->type = 'radio';
$this->container = Html::el();
$this->separator = Html::el('br');
if ($items !== NULL) {
$this->setItems($items);
}
}
示例7: __construct
/**
* @param string label
* @param array items from which to choose
* @param int number of rows that should be visible
*/
public function __construct($label = NULL, array $items = NULL, $size = NULL)
{
parent::__construct($label);
$this->control->setName('select');
$this->control->size = $size > 1 ? (int) $size : NULL;
$this->control->onfocus = 'this.onmousewheel=function(){return false}';
// prevents accidental change in IE
$this->label->onclick = 'document.getElementById(this.htmlFor).focus();return false';
// prevents deselect in IE 5 - 6
if ($items !== NULL) {
$this->setItems($items);
}
}
示例8: __construct
public function __construct($value, $name = null)
{
parent::__construct($name);
$this->value($value);
}
示例9: __construct
/**
* @param string label
*/
public function __construct($label)
{
$this->monitor('Nette\\Forms\\Form');
parent::__construct($label);
$this->control->type = 'file';
}
示例10: __construct
/**
* @param string caption
*/
public function __construct($caption = NULL)
{
parent::__construct($caption);
$this->control->type = 'button';
$this->value = FALSE;
}
示例11: __construct
/**
* @param string label
*/
public function __construct($label)
{
parent::__construct($label);
$this->control->type = 'checkbox';
$this->value = FALSE;
}
示例12: __construct
/**
* Called upon construct. Sets default control properties
*/
public function __construct($name, $storage = 'null:null', array $properties = array(), array $settings = array())
{
$this->properties['type'] = 'text';
parent::__construct($name, $storage, $properties, $settings);
}
示例13: __construct
/**
* @param string label
*/
public function __construct($label = NULL)
{
parent::__construct($label);
$this->control->type = 'file';
}
示例14: __construct
/**
* @param string label
*/
public function __construct($label = NULL)
{
parent::__construct($label);
$this->control->type = 'file';
$this->control->data['nette-rules'] = FALSE;
}
示例15: __construct
public function __construct($controlType, $controlId, $labelText)
{
parent::__construct($controlType, $controlId, $labelText);
$this->setHidden();
}