You are here

public function ImageStyleWarmerSettingsForm::validateForm in Image Style Warmer 8

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/ImageStyleWarmerSettingsForm.php, line 69

Class

ImageStyleWarmerSettingsForm
Provides a form for creating and editing Image Style Warmer settings.

Namespace

Drupal\image_style_warmer\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  parent::validateForm($form, $form_state);
  $form_state
    ->setValue('initial_image_styles', array_filter($form_state
    ->getValue('initial_image_styles')));
  $form_state
    ->setValue('queue_image_styles', array_filter($form_state
    ->getValue('queue_image_styles')));
}