protected function WebformOptionsLimitRouteSubscriber::alterRoutes in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_options_limit/src/Routing/WebformOptionsLimitRouteSubscriber.php \Drupal\webform_options_limit\Routing\WebformOptionsLimitRouteSubscriber::alterRoutes()
Alters existing routes for a specific collection.
Parameters
\Symfony\Component\Routing\RouteCollection $collection: The route collection for adding routes.
Overrides RouteSubscriberBase::alterRoutes
File
- modules/
webform_options_limit/ src/ Routing/ WebformOptionsLimitRouteSubscriber.php, line 34
Class
- WebformOptionsLimitRouteSubscriber
- Remove webform options limit routes.
Namespace
Drupal\webform_options_limit\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
if (!$this->moduleHandler
->moduleExists('webform_node')) {
$collection
->remove('entity.node.webform_options_limit.summary');
}
}