fml update

This commit is contained in:
Steffen Schröder
2014-01-21 20:30:40 +01:00
parent 71a19d2464
commit 11abd5ee6e
73 changed files with 209 additions and 83 deletions

View File

@ -16,7 +16,7 @@ use FML\Types\TextFormatable;
* @author steeffeen
*/
class Label extends Control implements Actionable, Linkable, NewLineable, Scriptable, Styleable, TextFormatable {
/**
/*
* Protected Properties
*/
protected $text = '';
@ -137,6 +137,14 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
return $this;
}
/**
*
* @see \FML\Types\Actionable::getAction()
*/
public function getAction() {
return $this->action;
}
/**
*
* @see \FML\Types\Actionable::setActionKey()
@ -263,7 +271,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
*/
public function render(\DOMDocument $domDocument) {
$xmlElement = parent::render($domDocument);
if ($this->text) {
if (strlen($this->text) > 0) {
$xmlElement->setAttribute('text', $this->text);
}
if ($this->textId) {
@ -281,7 +289,7 @@ class Label extends Control implements Actionable, Linkable, NewLineable, Script
if ($this->maxLines >= 0) {
$xmlElement->setAttribute('maxlines', $this->maxLines);
}
if ($this->action) {
if (strlen($this->action) > 0) {
$xmlElement->setAttribute('action', $this->action);
}
if ($this->actionKey >= 0) {