function Drupal::formBuilder
Returns the form builder service.
Return value
\Drupal\Core\Form\FormBuilderInterface The form builder.
4 calls to Drupal::formBuilder()
- DraggableListBuilder::__construct in core/
lib/ Drupal/ Core/ Config/ Entity/ DraggableListBuilder.php  - Constructs a new EntityListBuilder object.
 - 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.
 - WorkspaceFormPersistenceTest::setUp in core/
modules/ workspaces/ tests/ src/ Kernel/ WorkspaceFormPersistenceTest.php  
File
- 
              core/
lib/ Drupal.php, line 659  
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.