function TestFormApiFormBlock::__construct

Same name in other branches
  1. 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()
  2. 10 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()
  3. 11.x 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.

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.