function BlockListBuilder::__construct
Same name and namespace in other branches
- 11.x core/modules/block/src/BlockListBuilder.php \Drupal\block\BlockListBuilder::__construct()
- 10 core/modules/block/src/BlockListBuilder.php \Drupal\block\BlockListBuilder::__construct()
- 9 core/modules/block/src/BlockListBuilder.php \Drupal\block\BlockListBuilder::__construct()
- 8.9.x core/modules/block/src/BlockListBuilder.php \Drupal\block\BlockListBuilder::__construct()
Constructs a new EntityListBuilder object.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage class.
Overrides EntityListBuilder::__construct
File
-
core/
modules/ block/ src/ BlockListBuilder.php, line 71
Class
- BlockListBuilder
- Defines a class to build a listing of block entities.
Namespace
Drupal\blockCode
public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ThemeManagerInterface $theme_manager, FormBuilderInterface $form_builder, MessengerInterface $messenger, ?ThemeHandlerInterface $theme_handler = NULL) {
parent::__construct($entity_type, $storage);
$this->themeManager = $theme_manager;
$this->formBuilder = $form_builder;
$this->messenger = $messenger;
if (!$theme_handler instanceof ThemeHandlerInterface) {
@trigger_error('Calling ' . __CLASS__ . ' constructor without the $theme_handler argument is deprecated in drupal:11.4.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3015925', E_USER_DEPRECATED);
$theme_handler = \Drupal::service(ThemeHandlerInterface::class);
}
$this->themeHandler = $theme_handler;
$this->limit = FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.