public function GroupNodePermissionProvider::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 GroupContentPermissionProvider::getEntityViewUnpublishedPermission
File
- modules/
gnode/ src/ Plugin/ GroupNodePermissionProvider.php, line 15
Class
- GroupNodePermissionProvider
- Provides group permissions for group_node GroupContent entities.
Namespace
Drupal\gnode\PluginCode
public function getEntityViewUnpublishedPermission($scope = 'any') {
if ($scope === 'any') {
// Backwards compatible permission name for 'any' scope.
return "view unpublished {$this->pluginId} entity";
}
return parent::getEntityViewUnpublishedPermission($scope);
}