diff options
author | Marvin Borner | 2018-05-23 22:23:28 +0200 |
---|---|---|
committer | Marvin Borner | 2018-05-23 22:23:28 +0200 |
commit | b66a61addb6c8e66cb26fcf74b532d68891267e4 (patch) | |
tree | 05e9449ff25bdc98f68105f41923ccb9f6ef5095 /main/app/sprinkles/FormGenerator/src/Element/Checkbox.php | |
parent | 1d4ef435177a5f9b6d1a289800d933e49be0c550 (diff) |
Refactored code, many fixes and improvements in chat backend+frontend
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"; } } |