tagName = 'label'; $this->setZ(1); } /** * Set Text * * @param string $text Text Value * @return \FML\Controls\Label */ public function setText($text) { $this->text = (string) $text; return $this; } /** * Set Text Prefix * * @param string $textPrefix Text Prefix * @return \FML\Controls\Label */ public function setTextPrefix($textPrefix) { $this->textPrefix = (string) $textPrefix; return $this; } /** * Set Text Emboss * * @param bool $textEmboss Whether Text should be embossed * @return \FML\Controls\Label */ public function setTextEmboss($textEmboss) { $this->textEmboss = ($textEmboss ? 1 : 0); return $this; } /** * Set Translate * * @param bool $translate Whether Text should be translated * @return \FML\Controls\Label */ public function setTranslate($translate) { $this->translate = ($translate ? 1 : 0); return $this; } /** * Set Max Lines Count * * @param int $maxLines Max Lines Count * @return \FML\Controls\Label */ public function setMaxLines($maxLines) { $this->maxLines = (int) $maxLines; return $this; } /** * * @see \FML\Types\Actionable::setAction() * @return \FML\Controls\Label */ public function setAction($action) { $this->action = (string) $action; return $this; } /** * * @see \FML\Types\Actionable::setActionKey() * @return \FML\Controls\Label */ public function setActionKey($actionKey) { $this->actionKey = (int) $actionKey; return $this; } /** * * @see \FML\Types\Linkable::setUrl() * @return \FML\Controls\Label */ public function setUrl($url) { $this->url = (string) $url; return $this; } /** * * @see \FML\Types\Linkable::setManialink() * @return \FML\Controls\Label */ public function setManialink($manialink) { $this->manialink = (string) $manialink; return $this; } /** * * @see \FML\Types\NewLineable::setAutoNewLine() * @return \FML\Controls\Label */ public function setAutoNewLine($autoNewLine) { $this->autoNewLine = ($autoNewLine ? 1 : 0); return $this; } /** * * @see \FML\Types\Scriptable::setScriptEvents() * @return \FML\Controls\Label */ public function setScriptEvents($scriptEvents) { $this->scriptEvents = ($scriptEvents ? 1 : 0); return $this; } /** * * @see \FML\Types\Styleable::setStyle() * @return \FML\Controls\Label */ public function setStyle($style) { $this->style = (string) $style; return $this; } /** * * @see \FML\Types\TextFormatable::setTextSize() * @return \FML\Controls\Label */ public function setTextSize($textSize) { $this->textSize = (int) $textSize; return $this; } /** * * @see \FML\Types\TextFormatable::setTextColor() * @return \FML\Controls\Label */ public function setTextColor($textColor) { $this->textColor = (string) $textColor; return $this; } /** * * @see \FML\Types\TextFormatable::setAreaColor() * @return \FML\Controls\Label */ public function setAreaColor($areaColor) { $this->areaColor = (string) $areaColor; return $this; } /** * * @see \FML\Types\TextFormatable::setAreaFocusColor() * @return \FML\Controls\Label */ public function setAreaFocusColor($areaFocusColor) { $this->areaFocusColor = (string) $areaFocusColor; return $this; } /** * * @see \FML\Control::render() */ public function render(\DOMDocument $domDocument) { $xmlElement = parent::render($domDocument); if ($this->text) { $xmlElement->setAttribute('text', $this->text); } if ($this->textPrefix) { $xmlElement->setAttribute('textprefix', $this->textPrefix); } if ($this->textEmboss) { $xmlElement->setAttribute('textemboss', $this->textEmboss); } if ($this->translate) { $xmlElement->setAttribute('translate', $this->translate); } if ($this->maxLines >= 0) { $xmlElement->setAttribute('maxlines', $this->maxLines); } if ($this->action) { $xmlElement->setAttribute('action', $this->action); } if ($this->actionKey >= 0) { $xmlElement->setAttribute('actionkey', $this->actionKey); } if ($this->url) { $xmlElement->setAttribute('url', $this->url); } if ($this->manialink) { $xmlElement->setAttribute('manialink', $this->manialink); } if ($this->autoNewLine) { $xmlElement->setAttribute('autonewline', $this->autoNewLine); } if ($this->scriptEvents) { $xmlElement->setAttribute('scriptevents', $this->scriptEvents); } if ($this->style) { $xmlElement->setAttribute('style', $this->style); } if ($this->textSize >= 0) { $xmlElement->setAttribute('textsize', $this->textSize); } if ($this->textColor) { $xmlElement->setAttribute('textcolor', $this->textColor); } if ($this->areaColor) { $xmlElement->setAttribute('areacolor', $this->areaColor); } if ($this->areaFocusColor) { $xmlElement->setAttribute('areafocuscolor', $this->areaFocusColor); } return $xmlElement; } }