function ExampleConfigEntityExternalForm::buildForm

Same name and namespace in other branches
  1. 4.0.x tests/modules/ctools_wizard_test/src/Form/ExampleConfigEntityExternalForm.php \Drupal\ctools_wizard_test\Form\ExampleConfigEntityExternalForm::buildForm()

Overrides FormInterface::buildForm

File

tests/modules/ctools_wizard_test/src/Form/ExampleConfigEntityExternalForm.php, line 49

Class

ExampleConfigEntityExternalForm
Example form config entity.

Namespace

Drupal\ctools_wizard_test\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $machine_name = '') {
    $cached_values = $this->tempstore
        ->get('ctools_wizard_test.config_entity')
        ->get($machine_name);
    
    /** @var \Drupal\ctools_wizard_test\Entity\ExampleConfigEntity $page */
    $config_entity = $cached_values['ctools_wizard_test_config_entity'];
    $form['blah'] = [
        '#markup' => 'Value from one: ' . $config_entity->getOne(),
    ];
    return $form;
}