You are here

public function ImageAPIOptimizeProcessorFormBase::validateForm in Image Optimize (or ImageAPI Optimize) 8.3

Same name and namespace in other branches
  1. 8.2 src/Form/ImageAPIOptimizeProcessorFormBase.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizeProcessorFormBase::validateForm()
  2. 4.x src/Form/ImageAPIOptimizeProcessorFormBase.php \Drupal\imageapi_optimize\Form\ImageAPIOptimizeProcessorFormBase::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

src/Form/ImageAPIOptimizeProcessorFormBase.php, line 104

Class

ImageAPIOptimizeProcessorFormBase
Provides a base form for image optimize processors.

Namespace

Drupal\imageapi_optimize\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {

  // The image optimize processor configuration is stored in the 'data' key in the form,
  // pass that through for validation.
  $this->imageAPIOptimizeProcessor
    ->validateConfigurationForm($form['data'], SubformState::createForSubform($form['data'], $form, $form_state));
}