interface CalculatedGroupPermissionsItemInterface in Group 2.0.x
Same name and namespace in other branches
- 8 src/Access/CalculatedGroupPermissionsItemInterface.php \Drupal\group\Access\CalculatedGroupPermissionsItemInterface
Defines the calculated group permissions item interface.
Hierarchy
- interface \Drupal\group\Access\CalculatedGroupPermissionsItemInterface
Expanded class hierarchy of CalculatedGroupPermissionsItemInterface
All classes that implement CalculatedGroupPermissionsItemInterface
8 files declare their use of CalculatedGroupPermissionsItemInterface
- CalculatedGroupPermissionsItemTest.php in tests/
src/ Unit/ CalculatedGroupPermissionsItemTest.php - CalculatedGroupPermissionsTest.php in tests/
src/ Unit/ CalculatedGroupPermissionsTest.php - EntityQueryAlter.php in src/
QueryAccess/ EntityQueryAlter.php - GroupContentQueryAccessHandler.php in src/
Entity/ Access/ GroupContentQueryAccessHandler.php - GroupPermissionCheckerTest.php in tests/
src/ Unit/ GroupPermissionCheckerTest.php
File
- src/
Access/ CalculatedGroupPermissionsItemInterface.php, line 8
Namespace
Drupal\group\AccessView source
interface CalculatedGroupPermissionsItemInterface {
/**
* The scope for group based permissions (e.g.: memberships).
*/
const SCOPE_GROUP = 'group';
/**
* The scope for group type based permissions (e.g.: anonymous or outsider).
*/
const SCOPE_GROUP_TYPE = 'group_type';
/**
* Returns the scope of the calculated permissions item.
*
* @return string
* The scope name.
*/
public function getScope();
/**
* Returns the identifier within the scope.
*
* @return string|int
* The identifier.
*/
public function getIdentifier();
/**
* Returns the permissions for the calculated permissions item.
*
* @return string[]
* The permission names.
*/
public function getPermissions();
/**
* Returns whether this item grants admin privileges in its scope.
*
* @return bool
* Whether this item grants admin privileges.
*/
public function isAdmin();
/**
* Returns whether this item has a given permission.
*
* This should take ::isAdmin() into account.
*
* @param string $permission
* The permission name.
*
* @return bool
* Whether this item has the permission.
*/
public function hasPermission($permission);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CalculatedGroupPermissionsItemInterface:: |
public | function | Returns the identifier within the scope. | 1 |
CalculatedGroupPermissionsItemInterface:: |
public | function | Returns the permissions for the calculated permissions item. | 1 |
CalculatedGroupPermissionsItemInterface:: |
public | function | Returns the scope of the calculated permissions item. | 1 |
CalculatedGroupPermissionsItemInterface:: |
public | function | Returns whether this item has a given permission. | 1 |
CalculatedGroupPermissionsItemInterface:: |
public | function | Returns whether this item grants admin privileges in its scope. | 1 |
CalculatedGroupPermissionsItemInterface:: |
constant | The scope for group based permissions (e.g.: memberships). | ||
CalculatedGroupPermissionsItemInterface:: |
constant | The scope for group type based permissions (e.g.: anonymous or outsider). |