You are here

public function SimpleFormBlock::__construct in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/form_api_example/src/Plugin/Block/SimpleFormBlock.php \Drupal\form_api_example\Plugin\Block\SimpleFormBlock::__construct()

Overrides BlockPluginTrait::__construct

File

form_api_example/src/Plugin/Block/SimpleFormBlock.php, line 35

Class

SimpleFormBlock
Provides a 'Example: Display a form' block.

Namespace

Drupal\form_api_example\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;
}