public function FullEntityPermissionProvider::getEntityViewPermission in Group 8
Gets the name of the view permission for the relation.
Parameters
string $scope: (optional) Whether the 'any' or 'own' permission name should be returned. Defaults to 'any'.
Return value
string|false The permission name or FALSE if it does not apply.
Overrides GroupContentPermissionProvider::getEntityViewPermission
File
- tests/
modules/ group_test_plugin/ src/ Plugin/ GroupContentEnabler/ FullEntityPermissionProvider.php, line 15
Class
- FullEntityPermissionProvider
- Provides all possible permissions.
Namespace
Drupal\group_test_plugin\Plugin\GroupContentEnablerCode
public function getEntityViewPermission($scope = 'any') {
if ($this->definesEntityPermissions) {
if ($this->implementsOwnerInterface || $scope === 'any') {
return "view {$scope} {$this->pluginId} entity";
}
}
return FALSE;
}