public function PageWizardBase::submitVariantStep in Page Manager 8
Same name and namespace in other branches
- 8.4 page_manager_ui/src/Wizard/PageWizardBase.php \Drupal\page_manager_ui\Wizard\PageWizardBase::submitVariantStep()
Submission callback for the variant plugin steps.
File
- page_manager_ui/
src/ Wizard/ PageWizardBase.php, line 87 - Contains \Drupal\page_manager_ui\Wizard\PageWizardBase.
Class
Namespace
Drupal\page_manager_ui\WizardCode
public function submitVariantStep(array &$form, FormStateInterface $form_state) {
$cached_values = $form_state
->getTemporaryValue('wizard');
/** @var \Drupal\page_manager\PageVariantInterface $page_variant */
$page_variant = $cached_values['page_variant'];
/** @var \Drupal\Core\Display\VariantInterface $plugin */
$plugin = $cached_values['plugin'];
// Make sure the variant plugin on the page variant gets the configuration
// from the 'plugin' which should have been setup by the variant's steps.
if (!empty($plugin) && !empty($page_variant)) {
$page_variant
->getVariantPlugin()
->setConfiguration($plugin
->getConfiguration());
}
}