You are here

public function AccessSchemeForm::validateForm in Workbench Access 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/AccessSchemeForm.php, line 98

Class

AccessSchemeForm
Provides the access scheme form.

Namespace

Drupal\workbench_access\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  $access_scheme = $this->entity;
  if ($access_scheme
    ->getAccessScheme()
    ->hasFormClass('configure')) {
    $subform_state = SubformState::createForSubform($form['scheme_settings'], $form, $form_state);
    $access_scheme
      ->getAccessScheme()
      ->validateConfigurationForm($form['scheme_settings'], $subform_state);
  }
}