You are here

public function DisclaimerEmailBlock::__construct in Disclaimer 8

Overrides Drupal\Core\BlockBase::__construct().

Creates a DisclaimerEmailBlock instance.

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. The path alias manager.

\Drupal\Core\Path\PathValidatorInterface $path_validator: The path validator.

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

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/DisclaimerEmailBlock.php, line 58

Class

DisclaimerEmailBlock
Provides a 'DisclaimerEmailBlock' block.

Namespace

Drupal\disclaimer\Plugin\Block

Code

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