function AutowireBlock::__construct

Overrides BlockPluginTrait::__construct

File

core/modules/system/tests/modules/autowire_test/src/Plugin/Block/AutowireBlock.php, line 26

Class

AutowireBlock
Provides a block that can be autowired.

Namespace

Drupal\autowire_test\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, #[Autowire(service: 'lock')] protected LockBackendInterface $lock) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.