You are here

class Route in Open Social 8.9

Same name in this branch
  1. 8.9 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route
  2. 8.9 modules/social_features/social_group/modules/social_group_flexible_group/src/Subscriber/Route.php \Drupal\social_group_flexible_group\Subscriber\Route
Same name and namespace in other branches
  1. 8.2 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route
  2. 8.3 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route
  3. 8.4 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route
  4. 8.5 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route
  5. 8.6 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route
  6. 8.7 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route
  7. 8.8 modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route
  8. 10.0.x modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route
  9. 10.1.x modules/custom/social_gdpr/src/Subscriber/Route.php \Drupal\social_gdpr\Subscriber\Route

Class Route.

@package Drupal\social_gdpr\Subscriber

Hierarchy

  • class \Drupal\Core\Routing\RouteSubscriberBase implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
    • class \Drupal\social_gdpr\Subscriber\Route

Expanded class hierarchy of Route

1 string reference to 'Route'
social_gdpr.services.yml in modules/custom/social_gdpr/social_gdpr.services.yml
modules/custom/social_gdpr/social_gdpr.services.yml
1 service uses Route
social_gdpr.route_subscriber in modules/custom/social_gdpr/social_gdpr.services.yml
Drupal\social_gdpr\Subscriber\Route

File

modules/custom/social_gdpr/src/Subscriber/Route.php, line 13

Namespace

Drupal\social_gdpr\Subscriber
View source
class Route extends RouteSubscriberBase {

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

}

Members

Namesort descending Modifiers Type Description Overrides
Route::alterRoutes protected function Alters existing routes for a specific collection. Overrides RouteSubscriberBase::alterRoutes
RouteSubscriberBase::getSubscribedEvents public static function Returns an array of event names this subscriber wants to listen to. 5
RouteSubscriberBase::onAlterRoutes public function Delegates the route altering to self::alterRoutes(). 1