public function GroupContentPermissionProvider::getEntityViewUnpublishedPermission in Group 8
Gets the name of the view unpublished 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 GroupContentPermissionProviderInterface::getEntityViewUnpublishedPermission
3 calls to GroupContentPermissionProvider::getEntityViewUnpublishedPermission()
- GroupContentPermissionProvider::buildPermissions in src/
Plugin/ GroupContentPermissionProvider.php - Provides a list of group permissions the plugin exposes.
- GroupContentPermissionProvider::getPermission in src/
Plugin/ GroupContentPermissionProvider.php - Gets the name of the permission for the given operation, target and scope.
- GroupNodePermissionProvider::getEntityViewUnpublishedPermission in modules/
gnode/ src/ Plugin/ GroupNodePermissionProvider.php - Gets the name of the view unpublished permission for the relation.
2 methods override GroupContentPermissionProvider::getEntityViewUnpublishedPermission()
- FullEntityPermissionProvider::getEntityViewUnpublishedPermission in tests/
modules/ group_test_plugin/ src/ Plugin/ GroupContentEnabler/ FullEntityPermissionProvider.php - Gets the name of the view unpublished permission for the relation.
- GroupNodePermissionProvider::getEntityViewUnpublishedPermission in modules/
gnode/ src/ Plugin/ GroupNodePermissionProvider.php - Gets the name of the view unpublished permission for the relation.
File
- src/
Plugin/ GroupContentPermissionProvider.php, line 117
Class
- GroupContentPermissionProvider
- Provides group permissions for GroupContent entities.
Namespace
Drupal\group\PluginCode
public function getEntityViewUnpublishedPermission($scope = 'any') {
if ($this->definesEntityPermissions) {
if ($this->implementsPublishedInterface) {
// @todo Implement view own unpublished permission and add it here by
// checking for $this->implementsOwnerInterface.
if ($scope === 'any') {
return "view {$scope} unpublished {$this->pluginId} entity";
}
}
}
return FALSE;
}