Beispiel #1
0
 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);
     }
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 function __construct($href, $rel = 'stylesheet', $media = null)
 {
     parent::__construct('link', array('rel' => $rel, 'href' => $href, 'media' => $media));
 }
Beispiel #4
0
 function __construct($src = null, $type = 'text/javascript')
 {
     parent::__construct('script', array('src' => $src, 'type' => $type));
     $this->singleClose = false;
 }
Beispiel #5
0
 function __construct($name, $content)
 {
     parent::__construct('meta', array('name' => $name, 'content' => $content));
 }
 function __construct($tag, $name)
 {
     parent::__construct($tag, compact('name'));
 }