function ControllerBase::formBuilder
Same name in other branches
- 9 core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::formBuilder()
- 8.9.x core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::formBuilder()
- 11.x core/lib/Drupal/Core/Controller/ControllerBase.php \Drupal\Core\Controller\ControllerBase::formBuilder()
Returns the form builder service.
Return value
\Drupal\Core\Form\FormBuilderInterface
File
-
core/
lib/ Drupal/ Core/ Controller/ ControllerBase.php, line 219
Class
- ControllerBase
- Utility base class for thin controllers.
Namespace
Drupal\Core\ControllerCode
protected function formBuilder() {
if (!$this->formBuilder) {
$this->formBuilder = $this->container()
->get('form_builder');
}
return $this->formBuilder;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.