You are here

public function FrontendEnvironmentForm::validateForm in Build Hooks 8.2

Same name and namespace in other branches
  1. 3.x src/Form/FrontendEnvironmentForm.php \Drupal\build_hooks\Form\FrontendEnvironmentForm::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/FrontendEnvironmentForm.php, line 117

Class

FrontendEnvironmentForm
Class StaticFrontEnvironmentForm.

Namespace

Drupal\build_hooks\Form

Code

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

  /** @var \Drupal\build_hooks\Entity\FrontendEnvironmentInterface $entity */
  $entity = $this->entity;
  $sub_form_state = SubformState::createForSubform($form['settings'], $form, $form_state);

  // Call the plugin validate handler.
  $block = $entity
    ->getPlugin();
  $this
    ->getPluginForm($block)
    ->validateConfigurationForm($form, $sub_form_state);
}