huge fml update

This commit is contained in:
Steffen Schröder
2014-01-19 19:30:21 +01:00
parent 9654b26f2b
commit 771409b8eb
66 changed files with 2303 additions and 134 deletions

View File

@ -10,7 +10,7 @@ use FML\Types\Styleable;
use FML\Types\SubStyleable;
/**
* Quad Element
* Quad Control
* (CMlQuad)
*
* @author steeffeen
@ -20,7 +20,9 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
* Protected Properties
*/
protected $image = '';
protected $imageId = '';
protected $imageFocus = '';
protected $imageFocusId = '';
protected $colorize = '';
protected $modulizeColor = '';
protected $autoScale = 1;
@ -28,11 +30,24 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
protected $actionKey = -1;
protected $bgColor = '';
protected $url = '';
protected $urlId = '';
protected $manialink = '';
protected $manialinkId = '';
protected $scriptEvents = 0;
protected $style = '';
protected $subStyle = '';
/**
* Create a new Quad Control
*
* @param string $id (optional) Control Id
* @return \FML\Controls\Quad
*/
public static function create($id = null) {
$quad = new Quad($id);
return $quad;
}
/**
* Construct a new Quad Control
*
@ -55,6 +70,17 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
return $this;
}
/**
* Set Image Id to use from the Dico
*
* @param string $imageId Image Id
* @return \FML\Controls\Quad
*/
public function setImageId($imageId) {
$this->imageId = (string) $imageId;
return $this;
}
/**
* Set Focus Image Url
*
@ -66,6 +92,17 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
return $this;
}
/**
* Set Focus Image Id to use from the Dico
*
* @param string $imageFocusId Focus Image Id
* @return \FML\Controls\Quad
*/
public function setImageFocusId($imageFocusId) {
$this->imageFocusId = (string) $imageFocusId;
return $this;
}
/**
* Set Colorization
*
@ -139,6 +176,16 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
return $this;
}
/**
*
* @see \FML\Types\Linkable::setUrlId()
* @return \FML\Controls\Quad
*/
public function setUrlId($urlId) {
$this->urlId = (string) $urlId;
return $this;
}
/**
*
* @see \FML\Types\Linkable::setManialink()
@ -149,6 +196,16 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
return $this;
}
/**
*
* @see \FML\Types\Linkable::setManialinkId()
* @return \FML\Controls\Quad
*/
public function setManialinkId($manialinkId) {
$this->manialinkId = (string) $manialinkId;
return $this;
}
/**
*
* @see \FML\Types\Scriptable::setScriptEvents()
@ -199,9 +256,15 @@ class Quad extends Control implements Actionable, BgColorable, Linkable, Scripta
if ($this->image) {
$xmlElement->setAttribute('image', $this->image);
}
if ($this->imageId) {
$xmlElement->setAttribute('imageid', $this->imageId);
}
if ($this->imageFocus) {
$xmlElement->setAttribute('imagefocus', $this->imageFocus);
}
if ($this->imageFocusId) {
$xmlElement->setAttribute('imagefocusid', $this->imageFocusId);
}
if ($this->colorize) {
$xmlElement->setAttribute('colorize', $this->colorize);
}