function TestAccessBlock::__construct
Same name in other branches
- 8.9.x core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php \Drupal\block_test\Plugin\Block\TestAccessBlock::__construct()
- 10 core/modules/block/tests/modules/block_test/src/Plugin/Block/TestAccessBlock.php \Drupal\block_test\Plugin\Block\TestAccessBlock::__construct()
- 11.x 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 44
Class
- TestAccessBlock
- Provides a block to test access.
Namespace
Drupal\block_test\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, StateInterface $state) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->state = $state;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.