SocialGroupViewsBulkOperationsAccess.php in Open Social 10.3.x
Same filename and directory in other branches
- 8.9 modules/social_features/social_group/modules/social_group_gvbo/src/Access/SocialGroupViewsBulkOperationsAccess.php
- 8.5 modules/social_features/social_group/modules/social_group_gvbo/src/Access/SocialGroupViewsBulkOperationsAccess.php
- 8.6 modules/social_features/social_group/modules/social_group_gvbo/src/Access/SocialGroupViewsBulkOperationsAccess.php
- 8.7 modules/social_features/social_group/modules/social_group_gvbo/src/Access/SocialGroupViewsBulkOperationsAccess.php
- 8.8 modules/social_features/social_group/modules/social_group_gvbo/src/Access/SocialGroupViewsBulkOperationsAccess.php
- 10.0.x modules/social_features/social_group/modules/social_group_gvbo/src/Access/SocialGroupViewsBulkOperationsAccess.php
- 10.1.x modules/social_features/social_group/modules/social_group_gvbo/src/Access/SocialGroupViewsBulkOperationsAccess.php
- 10.2.x modules/social_features/social_group/modules/social_group_gvbo/src/Access/SocialGroupViewsBulkOperationsAccess.php
Namespace
Drupal\social_group_gvbo\AccessFile
modules/social_features/social_group/modules/social_group_gvbo/src/Access/SocialGroupViewsBulkOperationsAccess.phpView source
<?php
namespace Drupal\social_group_gvbo\Access;
use Drupal\Core\Routing\RouteMatch;
use Drupal\Core\Session\AccountInterface;
use Drupal\views_bulk_operations\Access\ViewsBulkOperationsAccess;
/**
* Defines VBO module access rules.
*/
class SocialGroupViewsBulkOperationsAccess extends ViewsBulkOperationsAccess {
/**
* {@inheritdoc}
*/
public function access(AccountInterface $account, RouteMatch $routeMatch) {
$parameters = [
'view_id' => 'group_manage_members',
'display_id' => 'page_group_manage_members',
];
$route = $routeMatch
->getRouteObject();
foreach ($parameters as $key => $value) {
$route
->setDefault($key, $value);
}
$parameters = $parameters + $routeMatch
->getParameters()
->all();
$routeMatch = new RouteMatch($routeMatch
->getRouteName(), $route, $parameters, $parameters);
return parent::access($account, $routeMatch);
}
}
Classes
Name | Description |
---|---|
SocialGroupViewsBulkOperationsAccess | Defines VBO module access rules. |