public function BlockPageVariant::__construct in Drupal 9
Same name and namespace in other branches
- 8 core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php \Drupal\block\Plugin\DisplayVariant\BlockPageVariant::__construct()
- 10 core/modules/block/src/Plugin/DisplayVariant/BlockPageVariant.php \Drupal\block\Plugin\DisplayVariant\BlockPageVariant::__construct()
Constructs a new BlockPageVariant.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin ID for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\block\BlockRepositoryInterface $block_repository: The block repository.
\Drupal\Core\Entity\EntityViewBuilderInterface $block_view_builder: The block view builder.
string[] $block_list_cache_tags: The Block entity type list cache tags.
Overrides VariantBase::__construct
File
- core/
modules/ block/ src/ Plugin/ DisplayVariant/ BlockPageVariant.php, line 85
Class
- BlockPageVariant
- Provides a page display variant that decorates the main content with blocks.
Namespace
Drupal\block\Plugin\DisplayVariantCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, BlockRepositoryInterface $block_repository, EntityViewBuilderInterface $block_view_builder, array $block_list_cache_tags) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->blockRepository = $block_repository;
$this->blockViewBuilder = $block_view_builder;
$this->blockListCacheTags = $block_list_cache_tags;
}