protected function WebformSubmissionLogRouteSubscriber::alterRoutes in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_submission_log/src/Routing/WebformSubmissionLogRouteSubscriber.php \Drupal\webform_submission_log\Routing\WebformSubmissionLogRouteSubscriber::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_submission_log/ src/ Routing/ WebformSubmissionLogRouteSubscriber.php, line 34
Class
- WebformSubmissionLogRouteSubscriber
- Remove webform node log routes.
Namespace
Drupal\webform_submission_log\RoutingCode
protected function alterRoutes(RouteCollection $collection) {
if (!$this->moduleHandler
->moduleExists('webform_node')) {
$collection
->remove('entity.node.webform.results_log');
$collection
->remove('entity.node.webform_submission.log');
}
}