public function PhotosAccess::alterRouteDefinition in Album Photos 8.5
Same name and namespace in other branches
- 6.0.x photos_access/src/Plugin/views/access/PhotosAccess.php \Drupal\photos_access\Plugin\views\access\PhotosAccess::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
- photos_access/
src/ Plugin/ views/ access/ PhotosAccess.php, line 133
Class
- PhotosAccess
- Access plugin for photos album and images.
Namespace
Drupal\photos_access\Plugin\views\accessCode
public function alterRouteDefinition(Route $route) {
$route
->setRequirement('_access', 'TRUE');
}