function FormController::buildForm
Same name in other branches
- 8.9.x core/modules/system/tests/modules/condition_test/src/FormController.php \Drupal\condition_test\FormController::buildForm()
- 10 core/modules/system/tests/modules/condition_test/src/FormController.php \Drupal\condition_test\FormController::buildForm()
- 11.x core/modules/system/tests/modules/condition_test/src/FormController.php \Drupal\condition_test\FormController::buildForm()
Overrides FormInterface::buildForm
File
-
core/
modules/ system/ tests/ modules/ condition_test/ src/ FormController.php, line 51
Class
- FormController
- Routing controller class for condition_test testing of condition forms.
Namespace
Drupal\condition_testCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['#tree'] = TRUE;
$form['entity_bundle'] = [];
$subformState = SubformState::createForSubform($form['entity_bundle'], $form, $form_state);
$form['entity_bundle'] = $this->condition
->buildConfigurationForm($form['entity_bundle'], $subformState);
$form['current_theme'] = [];
$subformState = SubformState::createForSubform($form['current_theme'], $form, $form_state);
$form['current_theme'] = $this->condition_current_theme
->buildConfigurationForm($form['current_theme'], $subformState);
$form['actions']['submit'] = [
'#type' => 'submit',
'#value' => $this->t('Submit'),
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.