You are here

public static function Drupal::formBuilder in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal.php \Drupal::formBuilder()
  2. 9 core/lib/Drupal.php \Drupal::formBuilder()

Returns the form builder service.

Return value

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

43 calls to Drupal::formBuilder()
ActionListBuilder::render in core/modules/action/src/ActionListBuilder.php
Builds the entity listing as renderable array for table.html.twig.
ActionsTest::testDropbuttonWithBubbleableMetadata in core/tests/Drupal/KernelTests/Core/Render/Element/ActionsTest.php
authorize.php in core/authorize.php
Administrative script for running authorized file operations.
CheckboxTest::testFormCheckbox in core/modules/system/tests/src/Functional/Form/CheckboxTest.php
ConfigFormTestBase::testConfigForm in core/tests/Drupal/KernelTests/ConfigFormTestBase.php
Submit the system_config_form ensure the configuration has expected values.

... See full list

File

core/lib/Drupal.php, line 629

Class

Drupal
Static Service Container wrapper.

Code

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