public function ListUsageController::__construct in Entity Usage 8.2
Same name and namespace in other branches
- 8.4 src/Controller/ListUsageController.php \Drupal\entity_usage\Controller\ListUsageController::__construct()
- 8 src/Controller/ListUsageController.php \Drupal\entity_usage\Controller\ListUsageController::__construct()
- 8.3 src/Controller/ListUsageController.php \Drupal\entity_usage\Controller\ListUsageController::__construct()
ListUsageController constructor.
Parameters
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The entity field manager.
\Drupal\entity_usage\EntityUsageInterface $entity_usage: The EntityUsage service.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.
\Drupal\Core\Pager\PagerManagerInterface $pager_manager: The pager manager.
File
- src/
Controller/ ListUsageController.php, line 85
Class
- ListUsageController
- Controller for our pages.
Namespace
Drupal\entity_usage\ControllerCode
public function __construct(EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, EntityUsageInterface $entity_usage, ConfigFactoryInterface $config_factory, PagerManagerInterface $pager_manager) {
$this->entityTypeManager = $entity_type_manager;
$this->entityFieldManager = $entity_field_manager;
$this->entityUsage = $entity_usage;
$this->entityUsageConfig = $config_factory
->get('entity_usage.settings');
$this->itemsPerPage = $this->entityUsageConfig
->get('usage_controller_items_per_page') ?: self::ITEMS_PER_PAGE_DEFAULT;
$this->pagerManager = $pager_manager;
}