You are here

public function PermissionProviderTrait::getPermission in Group 2.0.x

4 methods override PermissionProviderTrait::getPermission()
FullEntityPermissionProvider::getPermission in tests/modules/group_test_plugin/src/Plugin/Group/RelationHandler/FullEntityPermissionProvider.php
Gets the name of the permission for the given operation, target and scope.
GroupMembershipPermissionProvider::getPermission in src/Plugin/Group/RelationHandler/GroupMembershipPermissionProvider.php
Gets the name of the permission for the given operation, target and scope.
GroupNodePermissionProvider::getPermission in modules/gnode/src/Plugin/Group/RelationHandler/GroupNodePermissionProvider.php
Gets the name of the permission for the given operation, target and scope.
PermissionProvider::getPermission in src/Plugin/Group/RelationHandlerDefault/PermissionProvider.php
Gets the name of the permission for the given operation, target and scope.

File

src/Plugin/Group/RelationHandler/PermissionProviderTrait.php, line 73

Class

PermissionProviderTrait
Trait for group relation permission providers.

Namespace

Drupal\group\Plugin\Group\RelationHandler

Code

public function getPermission($operation, $target, $scope = 'any') {
  if (!isset($this->parent)) {
    throw new \LogicException('Using PermissionProviderTrait without assigning a parent or overwriting the methods.');
  }
  return $this->parent
    ->getPermission($operation, $target, $scope);
}