You are here

public function PanelizerWizardGeneralForm::submitForm in Panelizer 8.4

Same name and namespace in other branches
  1. 8.5 src/Form/PanelizerWizardGeneralForm.php \Drupal\panelizer\Form\PanelizerWizardGeneralForm::submitForm()
  2. 8.3 src/Form/PanelizerWizardGeneralForm.php \Drupal\panelizer\Form\PanelizerWizardGeneralForm::submitForm()

Form submission 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 FormInterface::submitForm

File

src/Form/PanelizerWizardGeneralForm.php, line 145

Class

PanelizerWizardGeneralForm
General settings for a panelized bundle.

Namespace

Drupal\panelizer\Form

Code

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

  /** @var \Drupal\panels\Plugin\DisplayVariant\PanelsDisplayVariant $plugin */
  $plugin = $cached_values['plugin'];
  $plugin
    ->submitConfigurationForm($form['variant_settings'], (new FormState())
    ->setValues($form_state
    ->getValue('variant_settings', [])));
  $configuration = $plugin
    ->getConfiguration();
  $cached_values['plugin']
    ->setConfiguration($configuration);
}