You are here

public function AnalyticsServiceForm::validateForm in Analytics 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/AnalyticsServiceForm.php, line 124

Class

AnalyticsServiceForm

Namespace

Drupal\analytics\Form

Code

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

  // Let the selected plugin validate its settings.
  if (Element::children($form['service_configuration'])) {
    $this->entity
      ->getService()
      ->validateConfigurationForm($form['service_configuration'], $this
      ->getPluginSubFormState($form, $form_state));
  }
}