You are here

public function TestAccessBlock::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php \Drupal\block_test\Plugin\Block\TestAccessBlock::__construct()
  2. 10 core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php \Drupal\block_test\Plugin\Block\TestAccessBlock::__construct()

Tests the test access block.

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\State\StateInterface $state: The state.

Overrides BlockPluginTrait::__construct

File

core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php, line 39

Class

TestAccessBlock
Provides a block to test access.

Namespace

Drupal\block_test\Plugin\Block

Code

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