protected function EntityAccess::createWorkspaceDeletePermission in Workspace 8
Derives the delete permission for a specific workspace.
Parameters
\Drupal\multiversion\Entity\WorkspaceInterface $workspace: The workspace from which to derive the permission.
Return value
array A single-item array with the permission to define.
1 call to EntityAccess::createWorkspaceDeletePermission()
- EntityAccess::workspacePermissions in src/
EntityAccess.php - Returns an array of workspace-specific permissions.
File
- src/
EntityAccess.php, line 246
Class
- EntityAccess
- Service wrapper for hooks relating to entity access control.
Namespace
Drupal\workspaceCode
protected function createWorkspaceDeletePermission(WorkspaceInterface $workspace) {
$perms['delete_workspace_' . $workspace
->id()] = [
'title' => $this
->t('Delete the %workspace workspace', [
'%workspace' => $workspace
->label(),
]),
'description' => $this
->t('View the %workspace workspace and all content within it', [
'%workspace' => $workspace
->label(),
]),
];
return $perms;
}