Issue #2158571 by tstoeckler, dawehner, kgoel, chx, tim.plunkett, catch, effulgentsia: Fixed Followup: Routes added in RouteSubscribers cannot be altered.
parent
afe174dc41
commit
e83b1202a3
|
@ -9,7 +9,6 @@ namespace Drupal\rest\Plugin\Derivative;
|
||||||
|
|
||||||
use Drupal\Core\Entity\EntityManagerInterface;
|
use Drupal\Core\Entity\EntityManagerInterface;
|
||||||
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
|
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
|
||||||
use Drupal\Core\Routing\RouteBuilder;
|
|
||||||
use Drupal\Core\Routing\RouteBuilderInterface;
|
use Drupal\Core\Routing\RouteBuilderInterface;
|
||||||
use Drupal\Core\Routing\RouteProviderInterface;
|
use Drupal\Core\Routing\RouteProviderInterface;
|
||||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||||
|
@ -113,7 +112,7 @@ class EntityDerivative implements ContainerDeriverInterface {
|
||||||
// use the path from the route instead of the default.
|
// use the path from the route instead of the default.
|
||||||
if ($route_name = $entity_type->getLinkTemplate($link_relation)) {
|
if ($route_name = $entity_type->getLinkTemplate($link_relation)) {
|
||||||
// @todo remove the try/catch as part of
|
// @todo remove the try/catch as part of
|
||||||
// http://drupal.org/node/2158571
|
// http://drupal.org/node/2281645
|
||||||
try {
|
try {
|
||||||
if (($collection = $this->routeBuilder->getCollectionDuringRebuild()) && $route = $collection->get($route_name)) {
|
if (($collection = $this->routeBuilder->getCollectionDuringRebuild()) && $route = $collection->get($route_name)) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue