diff options
Diffstat (limited to 'main/app/sprinkles/FormGenerator/src/Element/Checkbox.php')
-rw-r--r-- | main/app/sprinkles/FormGenerator/src/Element/Checkbox.php | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/main/app/sprinkles/FormGenerator/src/Element/Checkbox.php b/main/app/sprinkles/FormGenerator/src/Element/Checkbox.php deleted file mode 100644 index 97bfdba..0000000 --- a/main/app/sprinkles/FormGenerator/src/Element/Checkbox.php +++ /dev/null @@ -1,39 +0,0 @@ -<?php -/** - * UF Form Generator - * - * @link https://github.com/lcharette/UF_FormGenerator - * @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; - -/** - * Checkbox input type class. - * Manage the default attributes required to display a checkbox input - * - * @extends BaseInput - */ -class Checkbox extends BaseInput -{ - - /** - * {@inheritDoc} - */ - protected function applyTransformations() { - $this->element = array_merge([ - "class" => "js-icheck", - "name" => $this->name, - "id" => "field_" . $this->name, - "binary" => TRUE - ], $this->element); - - // We add the check status instead of the value - if ($this->element["binary"] !== FALSE && $this->getValue() == 1) { - $this->element["checked"] = "checked"; - } - } -} |