protected function PageVariantAddWizard::customizeForm in Page Manager 8
Same name and namespace in other branches
- 8.4 page_manager_ui/src/Wizard/PageVariantAddWizard.php \Drupal\page_manager_ui\Wizard\PageVariantAddWizard::customizeForm()
Helper function for generating label and id form elements.
Parameters
array $form:
\Drupal\Core\Form\FormStateInterface $form_state:
Return value
array
Overrides EntityFormWizardBase::customizeForm
File
- page_manager_ui/
src/ Wizard/ PageVariantAddWizard.php, line 119 - Contains \Drupal\page_manager_ui\Wizard\PageVariantAddWizard.
Class
Namespace
Drupal\page_manager_ui\WizardCode
protected function customizeForm(array $form, FormStateInterface $form_state) {
$form = parent::customizeForm($form, $form_state);
// We set the variant id as part of form submission.
if ($this->step == 'type' && isset($form['name']['id'])) {
unset($form['name']['id']);
}
return $form;
}