You are here

public function PanelsIPELayoutForm::validateForm in Panels 8.3

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

panels_ipe/src/Form/PanelsIPELayoutForm.php, line 157

Class

PanelsIPELayoutForm
Provides a form for configuring a layout for use with the IPE.

Namespace

Drupal\panels_ipe\Form

Code

public function validateForm(array &$form, FormStateInterface $form_state) {
  $layout_form_state = (new FormState())
    ->setValues($form_state
    ->getValue('settings', []));
  $this->layout
    ->validateConfigurationForm($form, $layout_form_state);

  // Update the original form values.
  $form_state
    ->setValue('settings', $layout_form_state
    ->getValues());
}