/** * @return Standard8_TitleNav */ public function setTitle($title) { if (strlen($title) > 0) { $this->_h1->innerHTML($title); } return $this; }
/** * @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; }
/** * @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); }
public final function setId($id) { if (Wax_Document::getElementById($id)) { throw new Wax_Document_Body_Element_Exception("Id \"{$id}\" already exists"); } parent::setId($id); }
/** * @return Wax_Document_Body_Form */ public function setHiddensClassName($className = null) { if (!is_null($class)) { $this->_hiddens->setClassName($className); } return $this; }
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); }
public function __construct($id = null) { parent::__construct('Body'); if ($id) { $this->setId($id); } }
public function __construct($publicId = null, $systemId = null) { parent::__construct('Html'); if ($publicId) { $this->_publicId = $publicId; } if ($systemId) { $this->_systemId = $systemId; } }
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(); }
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(); }
public function __toString() { $this->_container->appendChild($this->_bottom); return parent::__toString(); }
public static function __toString() { return sprintf('%s%s', self::$docType->__toString(), self::$documentElement->__toString()); }
public function __toString() { return parent::__toString(); }