8.5.x Drupal.php Drupal::formBuilder()
8.0.x Drupal.php Drupal::formBuilder()
8.1.x Drupal.php Drupal::formBuilder()
8.2.x Drupal.php Drupal::formBuilder()
8.3.x Drupal.php Drupal::formBuilder()
8.4.x Drupal.php Drupal::formBuilder()
8.6.x Drupal.php Drupal::formBuilder()

Returns the form builder service.

Return value

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

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');
}