You are here

public function OpignoStatisticsAccess::accessGroup in Opigno statistics 8

Same name and namespace in other branches
  1. 3.x src/Access/OpignoStatisticsAccess.php \Drupal\opigno_statistics\Access\OpignoStatisticsAccess::accessGroup()

Checks access for a route with group in params.

1 string reference to 'OpignoStatisticsAccess::accessGroup'
opigno_statistics.routing.yml in ./opigno_statistics.routing.yml
opigno_statistics.routing.yml

File

src/Access/OpignoStatisticsAccess.php, line 18

Class

OpignoStatisticsAccess
Opigno Statistics Access.

Namespace

Drupal\opigno_statistics\Access

Code

public function accessGroup(UserInterface $user, GroupInterface $group) {
  $account = \Drupal::currentUser();
  return opigno_statistics_group_access($group, 'view statistics', $account);
}