function ExampleConfigEntityTwoForm::buildForm
Same name in other branches
- 8.x-3.x tests/modules/ctools_wizard_test/src/Form/ExampleConfigEntityTwoForm.php \Drupal\ctools_wizard_test\Form\ExampleConfigEntityTwoForm::buildForm()
Overrides FormInterface::buildForm
File
-
tests/
modules/ ctools_wizard_test/ src/ Form/ ExampleConfigEntityTwoForm.php, line 23
Class
- ExampleConfigEntityTwoForm
- Simple wizard step form.
Namespace
Drupal\ctools_wizard_test\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$cached_values = $form_state->getTemporaryValue('wizard');
/** @var \Drupal\ctools_wizard_test\Entity\ExampleConfigEntity $page */
$config_entity = $cached_values['ctools_wizard_test_config_entity'];
$form['two'] = [
'#title' => $this->t('Two'),
'#type' => 'textfield',
'#default_value' => $config_entity->getTwo() ?: '',
];
return $form;
}