You are here

function simple_access_group_select in Simple Access 8.3

Same name and namespace in other branches
  1. 5.2 simple_access.module \simple_access_group_select()
  2. 5 simple_access.module \simple_access_group_select()
  3. 6.2 simple_access.module \simple_access_group_select()
  4. 7.2 simple_access.module \simple_access_group_select()

Return groups for which user is a member.

3 calls to simple_access_group_select()
simple_access_group_grant_form in ./simple_access.module
Configure grant group permissions.
simple_access_group_revoke_form in ./simple_access.module
Configure revoke group permissions.
_simple_access_filter_access in ./simple_access.module
Filter the access records for the current user.

File

./simple_access.module, line 430
Builds simple access definition for content access.

Code

function simple_access_group_select() {
  $groups = simple_access_get_groups();
  $groups = array_filter($groups, function ($a) {

    /** @var \Drupal\simple_access\Entity\SimpleAccessGroup $a */
    return $a
      ->canManageAccess();
  });
  return $groups;
}