public function BlockVisibilityGroupedListBuilder::__construct in Block Visibility Groups 8
Constructs a new BlockVisibilityGroupedListBuilder object.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage class.
\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager.
\Drupal\Core\Form\FormBuilderInterface $form_builder: The form builder.
\Drupal\Core\Entity\EntityStorageInterface $block_visibility_group_storage: The group entity storage.
\Drupal\Core\State\StateInterface $state: The state system service.
\Drupal\Core\Messenger\MessengerInterface|null $messenger: The messenger service.
Overrides BlockListBuilder::__construct
File
- src/
BlockVisibilityGroupedListBuilder.php, line 67
Class
- BlockVisibilityGroupedListBuilder
- Extends BlockListBuilder to add our elements only show certain blocks.
Namespace
Drupal\block_visibility_groupsCode
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ThemeManagerInterface $theme_manager, FormBuilderInterface $form_builder, EntityStorageInterface $block_visibility_group_storage, StateInterface $state, MessengerInterface $messenger) {
parent::__construct($entity_type, $storage, $theme_manager, $form_builder, $messenger);
$this->group_storage = $block_visibility_group_storage;
$this->state = $state;
}