Loading src/Routing/RouteSubscriber.php +3 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ namespace Drupal\commerce_vado\Routing; use Drupal\Core\Routing\RouteSubscriberBase; use Symfony\Component\Routing\RouteCollection; use Drupal\Core\Url; /** * The route subscriber. Loading @@ -17,7 +18,8 @@ class RouteSubscriber extends RouteSubscriberBase { if ($route = $collection->get('view.commerce_vado_groups.page_1')) { // Upcast the %commerce_product argument to the product entity // so the route loads properly. $route->setOption('parameters', ['commerce_product' => ['type' => 'entity:commerce_product']]); $route->setOption('parameters', ['commerce_product' => ['type' => 'entity:commerce_product']], ['query' => ['destination' => Url::fromRoute('<current>')->toString()]]); // Show the page in the admin theme. $route->setOption('_admin_route', TRUE); // Custom access check to hide the tab if the product Loading Loading
src/Routing/RouteSubscriber.php +3 −1 Original line number Diff line number Diff line Loading @@ -4,6 +4,7 @@ namespace Drupal\commerce_vado\Routing; use Drupal\Core\Routing\RouteSubscriberBase; use Symfony\Component\Routing\RouteCollection; use Drupal\Core\Url; /** * The route subscriber. Loading @@ -17,7 +18,8 @@ class RouteSubscriber extends RouteSubscriberBase { if ($route = $collection->get('view.commerce_vado_groups.page_1')) { // Upcast the %commerce_product argument to the product entity // so the route loads properly. $route->setOption('parameters', ['commerce_product' => ['type' => 'entity:commerce_product']]); $route->setOption('parameters', ['commerce_product' => ['type' => 'entity:commerce_product']], ['query' => ['destination' => Url::fromRoute('<current>')->toString()]]); // Show the page in the admin theme. $route->setOption('_admin_route', TRUE); // Custom access check to hide the tab if the product Loading