protected function FullEntityPermissionProvider::getEntityViewUnpublishedPermission in Group 2.0.x
Gets the name of the view unpublished permission for the entity.
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.
1 call to FullEntityPermissionProvider::getEntityViewUnpublishedPermission()
- 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.
File
- tests/
modules/ group_test_plugin/ src/ Plugin/ Group/ RelationHandler/ FullEntityPermissionProvider.php, line 103
Class
- FullEntityPermissionProvider
- Provides all possible permissions.
Namespace
Drupal\group_test_plugin\Plugin\Group\RelationHandlerCode
protected function getEntityViewUnpublishedPermission($scope = 'any') {
if ($this->definesEntityPermissions) {
if ($this->implementsOwnerInterface || $scope === 'any') {
return "view {$scope} unpublished {$this->pluginId} entity";
}
}
return FALSE;
}