public function ImageEffectFormBase::validateForm in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/image/src/Form/ImageEffectFormBase.php \Drupal\image\Form\ImageEffectFormBase::validateForm()
Form validation handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormBase::validateForm
File
- core/
modules/ image/ src/ Form/ ImageEffectFormBase.php, line 107 - Contains \Drupal\image\Form\ImageEffectFormBase.
Class
- ImageEffectFormBase
- Provides a base form for image effects.
Namespace
Drupal\image\FormCode
public function validateForm(array &$form, FormStateInterface $form_state) {
// The image effect configuration is stored in the 'data' key in the form,
// pass that through for validation.
$effect_data = (new FormState())
->setValues($form_state
->getValue('data'));
$this->imageEffect
->validateConfigurationForm($form, $effect_data);
// Update the original form values.
$form_state
->setValue('data', $effect_data
->getValues());
}