bgColor = (string) $bgColor; return $this; } /** * * @see \FML\Types\Styleable::setStyle() * @return \FML\Elements\Format */ public function setStyle($style) { $this->style = (string) $style; return $this; } /** * * @see \FML\Types\TextFormatable::setTextSize() * @return \FML\Elements\Format */ public function setTextSize($textSize) { $this->textSize = (int) $textSize; return $this; } /** * * @see \FML\Types\TextFormatable::setTextColor() * @return \FML\Elements\Format */ public function setTextColor($textColor) { $this->textColor = (string) $textColor; return $this; } /** * * @see \FML\Types\TextFormatable::setAreaColor() * @return \FML\Elements\Format */ public function setAreaColor($areaColor) { $this->focusAreaColor1 = (string) $areaColor; return $this; } /** * * @see \FML\Types\TextFormatable::setAreaFocusColor() * @return \FML\Elements\Format */ public function setAreaFocusColor($areaFocusColor) { $this->focusAreaColor2 = (string) $areaFocusColor; return $this; } /** * * @see \FML\Renderable::render() */ public function render(\DOMDocument $domDocument) { $formatXmlElement = $domDocument->createElement($this->tagName); if ($this->bgColor) { $formatXmlElement->setAttribute('bgcolor', $this->bgColor); } if ($this->style) { $formatXmlElement->setAttribute('style', $this->style); } if ($this->textSize >= 0) { $formatXmlElement->setAttribute('textsize', $this->textSize); } if ($this->textColor) { $formatXmlElement->setAttribute('textcolor', $this->textColor); } if ($this->focusAreaColor1) { $formatXmlElement->setAttribute('focusareacolor1', $this->focusAreaColor1); } if ($this->focusAreaColor2) { $formatXmlElement->setAttribute('focusareacolor2', $this->focusAreaColor2); } return $formatXmlElement; } }