You are here

protected function PanelizerEditWizard::customizeForm in Panelizer 8.3

Same name and namespace in other branches
  1. 8.5 src/Wizard/PanelizerEditWizard.php \Drupal\panelizer\Wizard\PanelizerEditWizard::customizeForm()
  2. 8.4 src/Wizard/PanelizerEditWizard.php \Drupal\panelizer\Wizard\PanelizerEditWizard::customizeForm()

Helper function for generating default form elements.

Parameters

array $form:

\Drupal\Core\Form\FormStateInterface $form_state:

Return value

array

Overrides PanelizerWizardBase::customizeForm

File

src/Wizard/PanelizerEditWizard.php, line 47

Class

PanelizerEditWizard

Namespace

Drupal\panelizer\Wizard

Code

protected function customizeForm(array $form, FormStateInterface $form_state) {

  // The page actions.
  $form['wizard_actions'] = [
    '#theme' => 'links',
    '#links' => [],
    '#attributes' => [
      'class' => [
        'inline',
      ],
    ],
  ];

  // The tree of wizard steps.
  $form['wizard_tree'] = [
    '#theme' => [
      'panelizer_wizard_tree',
    ],
    '#wizard' => $this,
    '#cached_values' => $form_state
      ->getTemporaryValue('wizard'),
  ];
  $form['#theme'] = 'panelizer_wizard_form';
  $form['#attached']['library'][] = 'panelizer/wizard_admin';
  $form = parent::customizeForm($form, $form_state);
  return $form;
}