8.3.x Drupal.php public static Drupal::formBuilder()
8.0.x Drupal.php public static Drupal::formBuilder()
8.1.x Drupal.php public static Drupal::formBuilder()
8.2.x Drupal.php public static Drupal::formBuilder()
8.4.x Drupal.php public static Drupal::formBuilder()

Returns the form builder service.

Return value

\Drupal\Core\Form\FormBuilderInterface The form builder.

34 calls to Drupal::formBuilder()
ActionListBuilder::render in core/modules/action/src/ActionListBuilder.php
Builds the entity listing as renderable array for table.html.twig.
AjaxTestController::dialog in core/modules/system/tests/modules/ajax_test/src/Controller/AjaxTestController.php
Returns a render array of form elements and links for dialog.
authorize.php in core/authorize.php
Administrative script for running authorized file operations.
BatchTestController::testProgrammatic in core/modules/system/tests/modules/batch_test/src/Controller/BatchTestController.php
Submits the 'Chained' form programmatically.
CheckboxTest::testFormCheckbox in core/modules/system/src/Tests/Form/CheckboxTest.php

... See full list

File

core/lib/Drupal.php, line 637
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function formBuilder() {
  return static::getContainer()->get('form_builder');
}