You are here

Route.php in Open Social 8.5

File

modules/custom/social_gdpr/src/Subscriber/Route.php
View source
<?php

namespace Drupal\social_gdpr\Subscriber;

use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;

/**
 * Class Route.
 *
 * @package Drupal\social_gdpr\Subscriber
 */
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');
    }
  }

}

Classes

Namesort descending Description
Route Class Route.