Exemplo n.º 1
0
 /**
  * @return Standard8_TitleNav
  */
 public function setTitle($title)
 {
     if (strlen($title) > 0) {
         $this->_h1->innerHTML($title);
     }
     return $this;
 }
Exemplo n.º 2
0
 /**
  * @return Standard8_Location
  */
 public function appendLocation($label, $uri, $inside = false, $icon = null)
 {
     $li = Wax_Document::createElement('li');
     $a = Wax_Document::createElement('a', $li)->setAttribute('href', $uri);
     if (!empty($icon)) {
         $li->appendClassName('image');
         $a->appendChild(Wax_Document::createElement('em')->appendChild(Wax_Document::$body->createImage(Standard8_Uri::createUriIcon($icon), $label))->appendChild(Wax_Document::createTextNode($label)));
     } else {
         $a->appendChild(Wax_Document::createElement('em')->innerHTML($label));
     }
     if (!is_null($this->_lastLi) && $inside) {
         $this->_lastLi->appendClassName('drop');
         $ul = $this->_lastLi->getElementsByTagName('ul');
         if (sizeof($ul) == 0) {
             $ul = Wax_Document::createElement('ul', $this->_lastLi)->appendChild($li);
         } elseif (sizeof($ul) == 1) {
             $ul = array_shift($ul);
             if ($ul instanceof Wax_Document_Element) {
                 $ul->appendChild($li);
             }
         }
     } else {
         $this->_lastLi = $li;
         $this->appendChild($li);
     }
     return $this;
 }
Exemplo n.º 3
0
 /**
  * @return Standard8_Sidebar
  */
 public function appendLine($label = null)
 {
     $li = Wax_Document::createElement('li')->setClassName('line');
     if (!empty($label)) {
         $li->appendChild(Wax_Document::createElement('span')->innerHTML($label));
     } else {
         $li->appendChild(Wax_Document::createComment(''));
     }
     $this->_pagesnav->appendChild($li);
 }
Exemplo n.º 4
0
 public final function setId($id)
 {
     if (Wax_Document::getElementById($id)) {
         throw new Wax_Document_Body_Element_Exception("Id \"{$id}\" already exists");
     }
     parent::setId($id);
 }
Exemplo n.º 5
0
 /**
  * @return Wax_Document_Body_Form
  */
 public function setHiddensClassName($className = null)
 {
     if (!is_null($class)) {
         $this->_hiddens->setClassName($className);
     }
     return $this;
 }
Exemplo n.º 6
0
 public function __construct($type = self::TYPE_TEXT, $language = self::LANG_JAVASCRIPT)
 {
     parent::__construct('Script');
     $this->setTagType(Wax_Document_Element::TAG_OPEN);
     $this->setAttribute('type', $type . '/' . $language);
     # $this->setAttribute('language', $language);
 }
Exemplo n.º 7
0
 public function __construct($id = null)
 {
     parent::__construct('Body');
     if ($id) {
         $this->setId($id);
     }
 }
Exemplo n.º 8
0
 public function __construct($publicId = null, $systemId = null)
 {
     parent::__construct('Html');
     if ($publicId) {
         $this->_publicId = $publicId;
     }
     if ($systemId) {
         $this->_systemId = $systemId;
     }
 }
Exemplo n.º 9
0
 public function __toString()
 {
     if ($this->_name) {
         $this->setAttribute('name', $this->_name);
     }
     if ($this->_httpEquiv) {
         $this->setAttribute('http-equiv', $this->_httpEquiv);
     }
     $this->setAttribute('content', $this->_content);
     return parent::__toString();
 }
Exemplo n.º 10
0
 public function __toString()
 {
     $xhtml = '';
     foreach ((array) $this->_import as $fileName) {
         $xhtml .= sprintf('@import url("%s");', $fileName);
     }
     foreach ((array) $this->_style as $styleName => $styles) {
         $xhtml .= sprintf('%s { %s }', $styleName, implode(', ', $styles));
     }
     $this->_innerHTML = $xhtml;
     return parent::__toString();
 }
Exemplo n.º 11
0
 public function __toString()
 {
     $this->_container->appendChild($this->_bottom);
     return parent::__toString();
 }
Exemplo n.º 12
0
 public static function __toString()
 {
     return sprintf('%s%s', self::$docType->__toString(), self::$documentElement->__toString());
 }
Exemplo n.º 13
0
 public function __toString()
 {
     return parent::__toString();
 }