Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RouteSubscriber.php

function RouteSubscriber::__construct

Same name in this branch
  1. 11.1.x core/modules/block_content/src/Routing/RouteSubscriber.php \Drupal\block_content\Routing\RouteSubscriber::__construct()
  2. 11.1.x core/modules/field_ui/src/Routing/RouteSubscriber.php \Drupal\field_ui\Routing\RouteSubscriber::__construct()
  3. 11.1.x core/modules/config_translation/src/Routing/RouteSubscriber.php \Drupal\config_translation\Routing\RouteSubscriber::__construct()

Constructs a \Drupal\views\EventSubscriber\RouteSubscriber instance.

Parameters

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

\Drupal\Core\State\StateInterface $state: The state key value store.

File

core/modules/views/src/EventSubscriber/RouteSubscriber.php, line 62

Class

RouteSubscriber
Builds up the routes of all views.

Namespace

Drupal\views\EventSubscriber

Code

public function __construct(EntityTypeManagerInterface $entity_type_manager, StateInterface $state) {
    $this->viewStorage = $entity_type_manager->getStorage('view');
    $this->state = $state;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal