/** * init value from the context */ protected function initValue() { if ($this->form !== false) { if ($this->form->getMode() == 'crud/extbase') { $method = 'get' . \Ameos\AmeosForm\Utility\StringUtility::camelCase($this->name); if (method_exists($this->form->getModel(), $method)) { $this->setValue($this->form->getModel()->{$method}()); } } if ($this->form->getMode() == 'crud/classic') { $this->setValue($this->form->getData($this->name)); } } if (!$this->valueSetted && isset($this->configuration['defaultValue'])) { $this->setValue($this->configuration['defaultValue']); } return $this; }