function __construct($value, $text = null, $selected = false) { $attributes = array(); $attributes['value'] = $value; if (null === $text) { $text = $value; } parent::__construct('option', $attributes, $text); if ($selected == true) { $this->setSelected(true); } }
function __construct($name, Internal\FormElementBase $element, $before = false) { $this->element = $element; $this->before = $before; if ($element instanceof CheckBox) { $element->html_override(''); } //set for $attributes = array(); if (isset($element->attributes['id'])) { $attributes['for'] =& $element->attributes['id']; } else { $id = md5($name); $element->attributes['id'] = $id; $attributes['for'] =& $element->attributes['id']; } parent::__construct('label', $attributes, $name); }
function __construct($href, $rel = 'stylesheet', $media = null) { parent::__construct('link', array('rel' => $rel, 'href' => $href, 'media' => $media)); }
function __construct($src = null, $type = 'text/javascript') { parent::__construct('script', array('src' => $src, 'type' => $type)); $this->singleClose = false; }
function __construct($name, $content) { parent::__construct('meta', array('name' => $name, 'content' => $content)); }
function __construct($tag, $name) { parent::__construct($tag, compact('name')); }