diff options
Diffstat (limited to 'main/app/sprinkles/FormGenerator/src/Element/Checkbox.php')
-rw-r--r-- | main/app/sprinkles/FormGenerator/src/Element/Checkbox.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/main/app/sprinkles/FormGenerator/src/Element/Checkbox.php b/main/app/sprinkles/FormGenerator/src/Element/Checkbox.php index 59e6eaf..97bfdba 100644 --- a/main/app/sprinkles/FormGenerator/src/Element/Checkbox.php +++ b/main/app/sprinkles/FormGenerator/src/Element/Checkbox.php @@ -6,6 +6,7 @@ * @copyright Copyright (c) 2017 Louis Charette * @license https://github.com/lcharette/UF_FormGenerator/blob/master/LICENSE (MIT License) */ + namespace UserFrosting\Sprinkle\FormGenerator\Element; use UserFrosting\Sprinkle\FormGenerator\Element\BaseInput; @@ -16,22 +17,22 @@ use UserFrosting\Sprinkle\FormGenerator\Element\BaseInput; * * @extends BaseInput */ -class Checkbox extends BaseInput { +class Checkbox extends BaseInput +{ /** * {@inheritDoc} */ - protected function applyTransformations() - { + protected function applyTransformations() { $this->element = array_merge([ "class" => "js-icheck", "name" => $this->name, "id" => "field_" . $this->name, - "binary" => true + "binary" => TRUE ], $this->element); // We add the check status instead of the value - if ($this->element["binary"] !== false && $this->getValue() == 1) { + if ($this->element["binary"] !== FALSE && $this->getValue() == 1) { $this->element["checked"] = "checked"; } } |