public function FrontendEnvironmentForm::validateForm in Build Hooks 3.x
Same name and namespace in other branches
- 8.2 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 119
Class
- FrontendEnvironmentForm
- Class StaticFrontEnvironmentForm.
Namespace
Drupal\build_hooks\FormCode
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);
}