public function StatisticsPopularBlock::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php \Drupal\statistics\Plugin\Block\StatisticsPopularBlock::__construct()
- 9 core/modules/statistics/src/Plugin/Block/StatisticsPopularBlock.php \Drupal\statistics\Plugin\Block\StatisticsPopularBlock::__construct()
Constructs a StatisticsPopularBlock object.
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\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The entity repository service
\Drupal\statistics\StatisticsStorageInterface $statistics_storage: The storage for statistics.
\Drupal\Core\Render\RendererInterface $renderer: The renderer configuration array.
File
- core/
modules/ statistics/ src/ Plugin/ Block/ StatisticsPopularBlock.php, line 70
Class
- StatisticsPopularBlock
- Provides a 'Popular content' block.
Namespace
Drupal\statistics\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, EntityRepositoryInterface $entity_repository, StatisticsStorageInterface $statistics_storage, RendererInterface $renderer) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->entityTypeManager = $entity_type_manager;
$this->entityRepository = $entity_repository;
$this->statisticsStorage = $statistics_storage;
$this->renderer = $renderer;
}