comparison core/modules/views/src/EventSubscriber/RouteSubscriber.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents c75dbcec494b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
1 <?php 1 <?php
2 2
3 namespace Drupal\views\EventSubscriber; 3 namespace Drupal\views\EventSubscriber;
4 4
5 use Drupal\Core\Entity\EntityManagerInterface; 5 use Drupal\Core\Entity\EntityTypeManagerInterface;
6 use Drupal\Core\State\StateInterface; 6 use Drupal\Core\State\StateInterface;
7 use Drupal\Core\Routing\RouteSubscriberBase; 7 use Drupal\Core\Routing\RouteSubscriberBase;
8 use Drupal\Core\Routing\RoutingEvents; 8 use Drupal\Core\Routing\RoutingEvents;
9 use Drupal\views\Plugin\views\display\DisplayRouterInterface; 9 use Drupal\views\Plugin\views\display\DisplayRouterInterface;
10 use Drupal\views\ViewExecutable; 10 use Drupal\views\ViewExecutable;
52 protected $viewRouteNames = []; 52 protected $viewRouteNames = [];
53 53
54 /** 54 /**
55 * Constructs a \Drupal\views\EventSubscriber\RouteSubscriber instance. 55 * Constructs a \Drupal\views\EventSubscriber\RouteSubscriber instance.
56 * 56 *
57 * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager 57 * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
58 * The entity manager. 58 * The entity type manager service.
59 * @param \Drupal\Core\State\StateInterface $state 59 * @param \Drupal\Core\State\StateInterface $state
60 * The state key value store. 60 * The state key value store.
61 */ 61 */
62 public function __construct(EntityManagerInterface $entity_manager, StateInterface $state) { 62 public function __construct(EntityTypeManagerInterface $entity_type_manager, StateInterface $state) {
63 $this->viewStorage = $entity_manager->getStorage('view'); 63 $this->viewStorage = $entity_type_manager->getStorage('view');
64 $this->state = $state; 64 $this->state = $state;
65 } 65 }
66 66
67 /** 67 /**
68 * Resets the internal state of the route subscriber. 68 * Resets the internal state of the route subscriber.