You are here

public function PeopleAccess::alterRouteDefinition in Open Social 10.3.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  2. 8 modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  3. 8.2 modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  4. 8.3 modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  5. 8.4 modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  6. 8.5 modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  7. 8.6 modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  8. 8.7 modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  9. 8.8 modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  10. 10.0.x modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  11. 10.1.x modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()
  12. 10.2.x modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php \Drupal\social_user\Plugin\views\access\PeopleAccess::alterRouteDefinition()

Allows access plugins to alter the route definition of a view.

Likely the access plugin will add new requirements, so its custom access checker can be applied.

Parameters

\Symfony\Component\Routing\Route $route: The route to change.

Overrides AccessPluginBase::alterRouteDefinition

File

modules/social_features/social_user/src/Plugin/views/access/PeopleAccess.php, line 42

Class

PeopleAccess
People page access plugin that provides access control based on some perms.

Namespace

Drupal\social_user\Plugin\views\access

Code

public function alterRouteDefinition(Route $route) {
  $route
    ->setRequirement('_custom_access', '\\Drupal\\social_user\\Controller\\SocialUserController::access');
}