RouteSubscriber.php in farmOS 2.x
File
modules/asset/group/src/Routing/RouteSubscriber.php
View source
<?php
namespace Drupal\farm_group\Routing;
use Drupal\Core\Routing\RouteSubscriberBase;
use Symfony\Component\Routing\RouteCollection;
class RouteSubscriber extends RouteSubscriberBase {
public function alterRoutes(RouteCollection $collection) {
if ($route = $collection
->get('view.farm_group_members.page')) {
$route
->setRequirement('_group_members_access', 'Drupal\\farm_group\\Access\\FarmGroupMembersViewsAccessCheck::access');
}
}
}