You are here

public function SettingsForm::validateForm in Warmer 8

Same name and namespace in other branches
  1. 2.x src/Form/SettingsForm.php \Drupal\warmer\Form\SettingsForm::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/SettingsForm.php, line 120

Class

SettingsForm
Settings form for the warmer module.

Namespace

Drupal\warmer\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  array_map(function (WarmerPluginBase $warmer) use (&$form, $form_state) {
    $id = $warmer
      ->getPluginId();
    $subform_state = SubformState::createForSubform($form[$id], $form, $form_state);
    $warmer
      ->validateConfigurationForm($form[$id], $subform_state);
  }, $this->warmerManager
    ->getWarmers());
}