public function __construct($forcedValue = NULL) { parent::__construct(); $this->control->type = 'hidden'; $this->value = (string) $forcedValue; $this->forcedValue = $forcedValue; }
/** * @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 TreeView options from which to choose */ public function __construct($label, TreeView $tree) { parent::__construct($label); $this->control->type = 'checkbox'; $this->container = NHtml::el(); if ($tree !== NULL) { $this->setItems($tree); } }
/** * @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 = NHtml::el(); $this->separator = NHtml::el('br'); if ($items !== NULL) { $this->setItems($items); } }
/** * @param string caption */ public function __construct($caption = NULL) { parent::__construct($caption); $this->control->type = 'button'; }
/** * @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 = 'checkbox'; $this->value = FALSE; }
/** * @param string label */ public function __construct($label = NULL) { parent::__construct($label); $this->addFilter($this->sanitize); }