function Drupal::formBuilder
Same name in other branches
- 9 core/lib/Drupal.php \Drupal::formBuilder()
- 8.9.x core/lib/Drupal.php \Drupal::formBuilder()
- 11.x core/lib/Drupal.php \Drupal::formBuilder()
Returns the form builder service.
Return value
\Drupal\Core\Form\FormBuilderInterface The form builder.
3 calls to Drupal::formBuilder()
- DraggableListBuilder::__construct in core/
lib/ Drupal/ Core/ Config/ Entity/ DraggableListBuilder.php - DrupalTest::testFormBuilder in core/
tests/ Drupal/ Tests/ Core/ DrupalTest.php - Tests the formBuilder() method.
- install_get_form in core/
includes/ install.core.inc - Builds and processes a form for the installer environment.
File
-
core/
lib/ Drupal.php, line 642
Class
- Drupal
- Static Service Container wrapper.
Code
public static function formBuilder() {
return static::getContainer()->get('form_builder');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.