protected function RouteSubscriber::alterRoutes in Lightning Media 8.3
Same name and namespace in other branches
- 8.4 src/Routing/RouteSubscriber.php \Drupal\lightning_media\Routing\RouteSubscriber::alterRoutes()
- 8 src/Routing/RouteSubscriber.php \Drupal\lightning_media\Routing\RouteSubscriber::alterRoutes()
- 8.2 src/Routing/RouteSubscriber.php \Drupal\lightning_media\Routing\RouteSubscriber::alterRoutes()
Alters existing routes for a specific collection.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.
Overrides RouteSubscriberBase::alterRoutes
File
- src/
Routing/ RouteSubscriber.php, line 17
Class
- RouteSubscriber
- Alters route definitions.
Namespace
Drupal\lightning_media\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
$route = $collection
->get('entity_embed.dialog');
if ($route) {
$route
->setDefault('_form', EntityEmbedDialog::class);
}
}