/** * @param $name string * @param $label string */ public function __construct($name, $label) { parent::__construct($name); $this->label = $label; }
/** * Add an element to the form * * @param form\Element $element * @return \lean\form\Element */ public function addElement(form\Element $element) { $this->elements[$element->getName()] = $element; $element->setId($this->name . '_' . $element->getName()); return $element; }
/** * @param $name string * @param $label string */ public function __construct($name, $label = '', $title = '') { parent::__construct($name, $label); $this->setAttribute('title', $title); }
/** * @param string $name * @param string $title * @param array $options */ public function __construct($name, $title, array $options) { parent::__construct($name, $title); $this->options = $options; }
/** * @param $name * @param array $options */ public function __construct($name, $options, $label = '', $tabindex = null) { parent::__construct($name, $label); $this->options = $options; $this->tabindex = $tabindex; }
/** * Get or set the value on results to 1 * * @param null $value * * @return Element|string */ public function setValue($value = null) { return parent::setValue(in_array((string) $value, array('on', 1)) ? 1 : 0); }