You are here

public function RouteSubscriber::__construct in Entity Usage 8

Same name and namespace in other branches
  1. 8.4 src/Routing/RouteSubscriber.php \Drupal\entity_usage\Routing\RouteSubscriber::__construct()
  2. 8.2 src/Routing/RouteSubscriber.php \Drupal\entity_usage\Routing\RouteSubscriber::__construct()
  3. 8.3 src/Routing/RouteSubscriber.php \Drupal\entity_usage\Routing\RouteSubscriber::__construct()

Constructs a new RouteSubscriber object.

Parameters

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_manager: The entity type manager.

\Drupal\Core\Config\ConfigFactoryInterface $config: The config factory service.

File

src/Routing/RouteSubscriber.php, line 40

Class

RouteSubscriber
Registers a route for generic usage local tasks for entities.

Namespace

Drupal\entity_usage\Routing

Code

public function __construct(EntityTypeManagerInterface $entity_manager, ConfigFactoryInterface $config) {
  $this->entityTypeManager = $entity_manager;
  $this->config = $config;
}