You are here

public function TestFormApiFormBlock::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/tests/modules/layout_builder_form_block_test/src/Plugin/Block/TestFormApiFormBlock.php \Drupal\layout_builder_form_block_test\Plugin\Block\TestFormApiFormBlock::__construct()
  2. 9 core/modules/layout_builder/tests/modules/layout_builder_form_block_test/src/Plugin/Block/TestFormApiFormBlock.php \Drupal\layout_builder_form_block_test\Plugin\Block\TestFormApiFormBlock::__construct()

TestFormApiFormBlock constructor.

Parameters

array $configuration: The plugin configuration, i.e. an array with configuration values keyed by configuration option name. The special key 'context' may be used to initialize the defined contexts by setting it to an array of context values keyed by context names.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Form\FormBuilderInterface $form_builder: The form builder service.

Overrides BlockPluginTrait::__construct

File

core/modules/layout_builder/tests/modules/layout_builder_form_block_test/src/Plugin/Block/TestFormApiFormBlock.php, line 45

Class

TestFormApiFormBlock
Provides a block containing a Form API form for use in Layout Builder tests.

Namespace

Drupal\layout_builder_form_block_test\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, FormBuilderInterface $form_builder) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->formBuilder = $form_builder;
}