You are here

public function PageVariantConfigureForm::validateForm in Page Manager 8.4

Same name and namespace in other branches
  1. 8 page_manager_ui/src/Form/PageVariantConfigureForm.php \Drupal\page_manager_ui\Form\PageVariantConfigureForm::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

page_manager_ui/src/Form/PageVariantConfigureForm.php, line 64

Class

PageVariantConfigureForm

Namespace

Drupal\page_manager_ui\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  $cached_values = $form_state
    ->getTemporaryValue('wizard');

  /** @var $page_variant \Drupal\page_manager\Entity\PageVariant */
  $page_variant = $cached_values['page_variant'];
  $variant_plugin = $page_variant
    ->getVariantPlugin();
  $variant_plugin
    ->validateConfigurationForm($form['variant_settings'], (new FormState())
    ->setValues($form_state
    ->getValue('variant_settings', [])));
}