/** * Updates a model field */ public function update() { $fieldName = $this->fieldName; if ($this->configurationHelper->isDisabled($this->fieldName)) { if (!$this->configurationHelper->hasValueField($this->fieldName, 'Preset') && !$this->configurationHelper->isNullable($this->fieldName)) { throw new \Exception('PvikAdminTools: Field ' . $this->fieldName . ' is not nullable and is disabled but does not have a "Preset" value.'); } $this->entity->{$fieldName} = $this->configurationHelper->getValue($this->fieldName, 'Preset'); } else { $this->entity->{$fieldName} = $this->getPOST(); } }