FML Update
This commit is contained in:
@@ -20,7 +20,7 @@ use FML\Types\ScriptFeatureable;
|
||||
*/
|
||||
class CheckBox implements Renderable, ScriptFeatureable {
|
||||
/*
|
||||
* Protected Properties
|
||||
* Protected properties
|
||||
*/
|
||||
protected $name = null;
|
||||
protected $feature = null;
|
||||
@@ -28,9 +28,9 @@ class CheckBox implements Renderable, ScriptFeatureable {
|
||||
/**
|
||||
* Create a new CheckBox Component
|
||||
*
|
||||
* @param string $name (optional) CheckBox Name
|
||||
* @param bool $default (optional) Default Value
|
||||
* @param Quad $quad (optional) CheckBox Quad
|
||||
* @param string $name (optional) CheckBox name
|
||||
* @param bool $default (optional) Default value
|
||||
* @param Quad $quad (optional) CheckBox quad
|
||||
*/
|
||||
public function __construct($name = null, $default = null, Quad $quad = null) {
|
||||
$this->feature = new CheckBoxFeature();
|
||||
@@ -40,10 +40,10 @@ class CheckBox implements Renderable, ScriptFeatureable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Name
|
||||
* Set the name
|
||||
*
|
||||
* @param string $name CheckBox Name
|
||||
* @return \FML\Components\CheckBox
|
||||
* @param string $name CheckBox name
|
||||
* @return \FML\Components\CheckBox|static
|
||||
*/
|
||||
public function setName($name) {
|
||||
$this->name = (string)$name;
|
||||
@@ -51,10 +51,10 @@ class CheckBox implements Renderable, ScriptFeatureable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Default Value
|
||||
* Set the default value
|
||||
*
|
||||
* @param bool $default Default Value
|
||||
* @return \FML\Components\CheckBox
|
||||
* @param bool $default Default value
|
||||
* @return \FML\Components\CheckBox|static
|
||||
*/
|
||||
public function setDefault($default) {
|
||||
$this->feature->setDefault($default);
|
||||
@@ -62,28 +62,36 @@ class CheckBox implements Renderable, ScriptFeatureable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Enabled Design
|
||||
* Set the enabled Design
|
||||
*
|
||||
* @param string $style Style Name or Image Url
|
||||
* @param string $subStyle SubStyle Name
|
||||
* @return \FML\Components\CheckBox
|
||||
* @param string $style Style name or image url
|
||||
* @param string $subStyle SubStyle name
|
||||
* @return \FML\Components\CheckBox|static
|
||||
*/
|
||||
public function setEnabledDesign($style, $subStyle = null) {
|
||||
$checkBoxDesign = new CheckBoxDesign($style, $subStyle);
|
||||
$this->feature->setEnabledDesign($checkBoxDesign);
|
||||
if (is_object($style) && ($style instanceof CheckBoxDesign)) {
|
||||
$this->feature->setEnabledDesign($style);
|
||||
} else {
|
||||
$checkBoxDesign = new CheckBoxDesign($style, $subStyle);
|
||||
$this->feature->setEnabledDesign($checkBoxDesign);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Disabled Design
|
||||
* Set the disabled Design
|
||||
*
|
||||
* @param string $style Style Name or Image Url
|
||||
* @param string $subStyle SubStyle Name
|
||||
* @return \FML\Components\CheckBox
|
||||
* @param string $style Style name or image url
|
||||
* @param string $subStyle SubStyle name
|
||||
* @return \FML\Components\CheckBox|static
|
||||
*/
|
||||
public function setDisabledDesign($style, $subStyle = null) {
|
||||
$checkBoxDesign = new CheckBoxDesign($style, $subStyle);
|
||||
$this->feature->setDisabledDesign($checkBoxDesign);
|
||||
if (is_object($style) && ($style instanceof CheckBoxDesign)) {
|
||||
$this->feature->setDisabledDesign($style);
|
||||
} else {
|
||||
$checkBoxDesign = new CheckBoxDesign($style, $subStyle);
|
||||
$this->feature->setDisabledDesign($checkBoxDesign);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -91,7 +99,7 @@ class CheckBox implements Renderable, ScriptFeatureable {
|
||||
* Set the CheckBox Quad
|
||||
*
|
||||
* @param Quad $quad CheckBox Quad
|
||||
* @return \FML\Components\CheckBox
|
||||
* @return \FML\Components\CheckBox|static
|
||||
*/
|
||||
public function setQuad(Quad $quad = null) {
|
||||
$this->feature->setQuad($quad);
|
||||
@@ -143,8 +151,7 @@ class CheckBox implements Renderable, ScriptFeatureable {
|
||||
*/
|
||||
protected function buildEntry() {
|
||||
$entry = new Entry();
|
||||
$entry->setVisible(false);
|
||||
$entry->setName($this->name);
|
||||
$entry->setVisible(false)->setName($this->name);
|
||||
return $entry;
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ use FML\Types\ScriptFeatureable;
|
||||
*/
|
||||
class ValuePicker implements Renderable, ScriptFeatureable {
|
||||
/*
|
||||
* Protected Properties
|
||||
* Protected properties
|
||||
*/
|
||||
protected $name = null;
|
||||
protected $feature = null;
|
||||
@@ -27,10 +27,10 @@ class ValuePicker implements Renderable, ScriptFeatureable {
|
||||
/**
|
||||
* Create a new ValuePicker Component
|
||||
*
|
||||
* @param string $name (optional) CheckBox Name
|
||||
* @param array $values (optional) Possible Values
|
||||
* @param bool $default (optional) Default Value
|
||||
* @param Label $label (optional) ValuePicker Label
|
||||
* @param string $name (optional) CheckBox name
|
||||
* @param array $values (optional) Possible values
|
||||
* @param bool $default (optional) Default value
|
||||
* @param Label $label (optional) ValuePicker label
|
||||
*/
|
||||
public function __construct($name = null, array $values = array(), $default = null, Label $label = null) {
|
||||
$this->feature = new ValuePickerFeature();
|
||||
@@ -41,10 +41,10 @@ class ValuePicker implements Renderable, ScriptFeatureable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Name
|
||||
* Set Name
|
||||
*
|
||||
* @param string $name ValuePicker Name
|
||||
* @return \FML\Components\ValuePicker
|
||||
* @param string $name ValuePicker name
|
||||
* @return \FML\Components\ValuePicker|static
|
||||
*/
|
||||
public function setName($name) {
|
||||
$this->name = (string)$name;
|
||||
@@ -52,10 +52,10 @@ class ValuePicker implements Renderable, ScriptFeatureable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the possible Values
|
||||
* Set the possible values
|
||||
*
|
||||
* @param array $values Possible Values
|
||||
* @return \FML\Components\ValuePicker
|
||||
* @param array $values Possible values
|
||||
* @return \FML\Components\ValuePicker|static
|
||||
*/
|
||||
public function setValues(array $values) {
|
||||
$this->feature->setValues($values);
|
||||
@@ -63,10 +63,10 @@ class ValuePicker implements Renderable, ScriptFeatureable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Default Value
|
||||
* Set the default value
|
||||
*
|
||||
* @param bool $default Default Value
|
||||
* @return \FML\Components\ValuePicker
|
||||
* @param bool $default Default value
|
||||
* @return \FML\Components\ValuePicker|static
|
||||
*/
|
||||
public function setDefault($default) {
|
||||
$this->feature->setDefault($default);
|
||||
@@ -77,7 +77,7 @@ class ValuePicker implements Renderable, ScriptFeatureable {
|
||||
* Set the ValuePicker Label
|
||||
*
|
||||
* @param Label $label ValuePicker Label
|
||||
* @return \FML\Components\ValuePicker
|
||||
* @return \FML\Components\ValuePicker|static
|
||||
*/
|
||||
public function setLabel(Label $label = null) {
|
||||
$this->feature->setLabel($label);
|
||||
@@ -128,8 +128,7 @@ class ValuePicker implements Renderable, ScriptFeatureable {
|
||||
*/
|
||||
protected function buildEntry() {
|
||||
$entry = new Entry();
|
||||
$entry->setVisible(false);
|
||||
$entry->setName($this->name);
|
||||
$entry->setVisible(false)->setName($this->name);
|
||||
return $entry;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user