Ejemplo n.º 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);
     }
 }
Ejemplo n.º 2
0
 function __toString()
 {
     if ($this->element instanceof CheckBox) {
         $this->element->html_override(null);
         $inner = $this->inner;
         if ($this->before) {
             $this->inner = (string) $this->element . $this->inner;
         } else {
             $this->inner .= (string) $this->element;
         }
         $this->element->html_override('');
         $ret = parent::__toString();
         $this->inner = $inner;
         return $ret;
     }
     return parent::__toString();
 }
Ejemplo n.º 3
0
 function __construct($href, $rel = 'stylesheet', $media = null)
 {
     parent::__construct('link', array('rel' => $rel, 'href' => $href, 'media' => $media));
 }
Ejemplo n.º 4
0
 function __construct($src = null, $type = 'text/javascript')
 {
     parent::__construct('script', array('src' => $src, 'type' => $type));
     $this->singleClose = false;
 }
Ejemplo n.º 5
0
 function __construct($name, $content)
 {
     parent::__construct('meta', array('name' => $name, 'content' => $content));
 }
Ejemplo n.º 6
0
 function __construct($tag, $name)
 {
     parent::__construct($tag, compact('name'));
 }