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); }
public function __construct($forcedValue = NULL) { parent::__construct(); $this->control->type = 'hidden'; $this->value = (string) $forcedValue; $this->forcedValue = $forcedValue; }
public function __construct($forcedValue = NULL) { parent::__construct(); $this->control->type = 'hidden'; $this->control->data['nette-rules'] = FALSE; $this->value = (string) $forcedValue; $this->forcedValue = $forcedValue; }
/** * @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; }
/** * @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); } }
/** * @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); } }
/** * @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); } }
public function __construct($value, $name = null) { parent::__construct($name); $this->value($value); }
/** * @param string label */ public function __construct($label) { $this->monitor('Nette\\Forms\\Form'); parent::__construct($label); $this->control->type = 'file'; }
/** * @param string caption */ public function __construct($caption = NULL) { parent::__construct($caption); $this->control->type = 'button'; $this->value = FALSE; }
/** * @param string label */ public function __construct($label) { parent::__construct($label); $this->control->type = 'checkbox'; $this->value = FALSE; }
/** * 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); }
/** * @param string label */ public function __construct($label = NULL) { parent::__construct($label); $this->control->type = 'file'; }
/** * @param string label */ public function __construct($label = NULL) { parent::__construct($label); $this->control->type = 'file'; $this->control->data['nette-rules'] = FALSE; }
public function __construct($controlType, $controlId, $labelText) { parent::__construct($controlType, $controlId, $labelText); $this->setHidden(); }
/** * FormControlText constructor - set initial settings of the control * * @param string $storage The storage location for this control * @param string $default The default value of the control * @param string $caption The caption used as the label when displaying a control */ public function __construct() { $args = func_get_args(); list($name, $storage, $caption, $template) = array_merge($args, array_fill(0, 4, null)); parent::__construct($name, $storage, $caption, $template); $this->properties['type'] = 'text'; }