From 85211481260c076ad5e2889b66465495c33429ef Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 24 May 2018 00:31:19 +0200 Subject: Many fixes, began user feed generator --- .../FormGenerator/src/Element/BaseInput.php | 111 --------------------- 1 file changed, 111 deletions(-) delete mode 100644 main/app/sprinkles/FormGenerator/src/Element/BaseInput.php (limited to 'main/app/sprinkles/FormGenerator/src/Element/BaseInput.php') diff --git a/main/app/sprinkles/FormGenerator/src/Element/BaseInput.php b/main/app/sprinkles/FormGenerator/src/Element/BaseInput.php deleted file mode 100644 index cf78dc6..0000000 --- a/main/app/sprinkles/FormGenerator/src/Element/BaseInput.php +++ /dev/null @@ -1,111 +0,0 @@ -name = $name; - $this->element = $element; - $this->value = $value; - } - - /** - * parse function. - * - * Return the parsed input attributes - * @access public - * @return void - */ - public function parse() { - $this->applyTransformations(); - return $this->element; - } - - /** - * translateArgValue function. - * - * Translate the value of passed argument using the Translator Facade - * @access public - * @param String $argument - * @return void - */ - public function translateArgValue($argument) { - if (isset($this->element[$argument])) { - $this->element[$argument] = Translator::translate($this->element[$argument]); - } - } - - /** - * getValue function. - * - * Return the value of the current input element. If not value is set in - * `$this->value`, return the default value (from the schema data), if any. - * @access public - * @return string The input current value - */ - public function getValue() { - if (isset($this->value) && $this->value !== NULL) { - return $this->value; - } else if (isset($this->element['default'])) { - return $this->element['default']; - } else { - return ""; - } - } - - /** - * applyTransformations function. - * - * Add defaut attributes to the current input element. Also transform - * attributes values passed from the schema - * @access protected - * @abstract - * @return void - */ - abstract protected function applyTransformations(); -} -- cgit v1.2.3