You are here

public function DisclaimerBlock::__construct in Disclaimer 8

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

Creates a DisclaimerBlock 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.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/DisclaimerBlock.php, line 48

Class

DisclaimerBlock
Provides a 'DisclaimerBlock' block.

Namespace

Drupal\disclaimer\Plugin\Block

Code

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