You are here

protected function FormWizardBase::customizeForm in Chaos Tool Suite (ctools) 8.3

Helper function for generating default form elements.

Parameters

array $form:

\Drupal\Core\Form\FormStateInterface $form_state:

Return value

array

2 calls to FormWizardBase::customizeForm()
EntityFormWizardBase::customizeForm in src/Wizard/EntityFormWizardBase.php
Helper function for generating label and id form elements.
FormWizardBase::buildForm in src/Wizard/FormWizardBase.php
Form constructor.
1 method overrides FormWizardBase::customizeForm()
EntityFormWizardBase::customizeForm in src/Wizard/EntityFormWizardBase.php
Helper function for generating label and id form elements.

File

src/Wizard/FormWizardBase.php, line 332

Class

FormWizardBase
The base class for all form wizard.

Namespace

Drupal\ctools\Wizard

Code

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

  // Setup the step rendering theme element.
  $prefix = [
    '#theme' => [
      'ctools_wizard_trail',
    ],
    '#wizard' => $this,
    '#cached_values' => $form_state
      ->getTemporaryValue('wizard'),
  ];

  // @todo properly inject the renderer.
  $form['#prefix'] = \Drupal::service('renderer')
    ->render($prefix);
  return $form;
}