You are here

public function NegotiationLanguageCookieForm::validateForm in Language Cookie 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/NegotiationLanguageCookieForm.php, line 145

Class

NegotiationLanguageCookieForm
Configure the Language cookie negotiation method for this site.

Namespace

Drupal\language_cookie\Form

Code

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

  /** @var \Drupal\language_cookie\LanguageCookieConditionInterface $condition */
  foreach ($form_state
    ->get([
    'conditions',
  ]) as $condition) {
    $condition
      ->validateConfigurationForm($form, $form_state);
  }
}