Beispiel #1
0
 /**
  * Constructor
  *
  * @param string     $name
  * @param mixed|null $options
  * @param array      $attribs
  * @param mixed      $selected
  * @param bool       $multiple
  */
 public function __construct($name, $options, $attribs = array(), $selected = null, $multiple = false)
 {
     $attribs['name'] = $name;
     $this->setSelected($selected);
     $this->setMultiple($multiple);
     parent::__construct('select', $options, $attribs);
 }
 /**
  * Constructor
  *
  * @param string  $type
  * @param string  $name
  * @param array   $value
  * @param array   $attribs
  */
 public function __construct($type, $name, $value, $attribs = array())
 {
     $attribs['type'] = $type;
     $attribs['name'] = $name;
     $attribs['value'] = $value;
     parent::__construct('input', null, $attribs);
 }
Beispiel #3
0
 /**
  * @param $text
  * @param $value
  * @param $attributes
  */
 public function __construct($text = null, $value = null, $attributes = array())
 {
     $this->value = $value;
     $attributes['value'] = $value;
     parent::__construct('option', $text, $attributes);
 }
 /**
  * Constructor.
  *
  * @param ListItem[] $items
  * @param array      $attribs
  */
 public function __construct($items = array(), $attribs = array())
 {
     parent::__construct($this->name, null, $attribs);
     $this->setItems((array) $items);
 }
 /**
  * Constructor
  *
  * @param string     $name
  * @param mixed|null $options
  * @param array      $attribs
  * @param mixed      $checked
  */
 public function __construct($name, $options, $attribs = array(), $checked = null)
 {
     $attribs['name'] = $name;
     $this->checked = $checked;
     parent::__construct('span', $options, $attribs);
 }
 /**
  * Constructor
  *
  * @param mixed  $content Element content.
  * @param array  $attribs Element attributes.
  */
 public function __construct($content = null, $attribs = array())
 {
     parent::__construct('dt', $content, $attribs);
 }
 /**
  * Constructor.
  *
  * @param array   $attribs
  */
 public function __construct($attribs = array())
 {
     parent::__construct($this->name, null, $attribs);
     $this->content = new HtmlElements();
 }