Mercurial > hg > cmmr2012-drupal-site
diff core/modules/field_ui/src/Routing/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 |
line wrap: on
line diff
--- a/core/modules/field_ui/src/Routing/RouteSubscriber.php Thu Feb 28 13:11:55 2019 +0000 +++ b/core/modules/field_ui/src/Routing/RouteSubscriber.php Thu May 09 15:34:47 2019 +0100 @@ -2,7 +2,7 @@ namespace Drupal\field_ui\Routing; -use Drupal\Core\Entity\EntityManagerInterface; +use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Routing\RouteSubscriberBase; use Drupal\Core\Routing\RoutingEvents; use Symfony\Component\Routing\Route; @@ -14,27 +14,27 @@ class RouteSubscriber extends RouteSubscriberBase { /** - * The entity type manager + * The entity type manager service. * - * @var \Drupal\Core\Entity\EntityManagerInterface + * @var \Drupal\Core\Entity\EntityTypeManagerInterface */ - protected $manager; + protected $entityTypeManager; /** * Constructs a RouteSubscriber object. * - * @param \Drupal\Core\Entity\EntityManagerInterface $manager - * The entity type manager. + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager + * The entity type manager service. */ - public function __construct(EntityManagerInterface $manager) { - $this->manager = $manager; + public function __construct(EntityTypeManagerInterface $entity_type_manager) { + $this->entityTypeManager = $entity_type_manager; } /** * {@inheritdoc} */ protected function alterRoutes(RouteCollection $collection) { - foreach ($this->manager->getDefinitions() as $entity_type_id => $entity_type) { + foreach ($this->entityTypeManager->getDefinitions() as $entity_type_id => $entity_type) { if ($route_name = $entity_type->get('field_ui_base_route')) { // Try to get the route from the current collection. if (!$entity_route = $collection->get($route_name)) {