You are here

protected function Route::alterRoutes in Open Social 8.6

Same name in this branch
  1. 8.6 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::alterRoutes()
  2. 8.6 modules/social_features/social_group/modules/social_group_flexible_group/src/Subscriber/Route.php \Drupal\social_group_flexible_group\Subscriber\Route::alterRoutes()
Same name and namespace in other branches
  1. 8.9 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::alterRoutes()
  2. 8.2 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::alterRoutes()
  3. 8.3 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::alterRoutes()
  4. 8.4 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::alterRoutes()
  5. 8.5 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::alterRoutes()
  6. 8.7 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::alterRoutes()
  7. 8.8 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::alterRoutes()
  8. 10.0.x modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::alterRoutes()
  9. 10.1.x modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route::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/custom/social_gdpr/src/Subscriber/Route.php, line 18

Class

Route
Class Route.

Namespace

Drupal\social_gdpr\Subscriber

Code

protected function alterRoutes(RouteCollection $collection) {
  if ($route = $collection
    ->get('data_policy.data_policy')) {
    $route
      ->setRequirement('_custom_access', '\\Drupal\\social_gdpr\\Controller\\DataPolicy::entityOverviewAccess');
  }
}