Route.php in Open Social 8.5
Same filename and directory in other branches
- 8.9 modules/custom/social_gdpr/src/Subscriber/Route.php
- 8.2 modules/custom/social_gdpr/src/Subscriber/Route.php
- 8.3 modules/custom/social_gdpr/src/Subscriber/Route.php
- 8.4 modules/custom/social_gdpr/src/Subscriber/Route.php
- 8.6 modules/custom/social_gdpr/src/Subscriber/Route.php
- 8.7 modules/custom/social_gdpr/src/Subscriber/Route.php
- 8.8 modules/custom/social_gdpr/src/Subscriber/Route.php
- 10.0.x modules/custom/social_gdpr/src/Subscriber/Route.php
- 10.1.x modules/custom/social_gdpr/src/Subscriber/Route.php
Namespace
Drupal\social_gdpr\SubscriberFile
modules/custom/social_gdpr/src/Subscriber/Route.phpView 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');
}
}
}