Example #1
0
 /**
  * @param $name  string
  * @param $label string
  */
 public function __construct($name, $label)
 {
     parent::__construct($name);
     $this->label = $label;
 }
Example #2
0
 /**
  * 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;
 }
Example #3
0
 /**
  * @param $name  string
  * @param $label string
  */
 public function __construct($name, $label = '', $title = '')
 {
     parent::__construct($name, $label);
     $this->setAttribute('title', $title);
 }
Example #4
0
 /**
  * @param string $name
  * @param string $title
  * @param array  $options
  */
 public function __construct($name, $title, array $options)
 {
     parent::__construct($name, $title);
     $this->options = $options;
 }
Example #5
0
 /**
  * @param       $name
  * @param array $options
  */
 public function __construct($name, $options, $label = '', $tabindex = null)
 {
     parent::__construct($name, $label);
     $this->options = $options;
     $this->tabindex = $tabindex;
 }
Example #6
0
 /**
  * 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);
 }