protected function EntityAccess::createWorkspaceViewPermission in Workspace 8
Derives the view 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::createWorkspaceViewPermission()
- EntityAccess::workspacePermissions in src/
EntityAccess.php - Returns an array of workspace-specific permissions.
File
- src/
EntityAccess.php, line 210
Class
- EntityAccess
- Service wrapper for hooks relating to entity access control.
Namespace
Drupal\workspaceCode
protected function createWorkspaceViewPermission(WorkspaceInterface $workspace) {
$perms['view_workspace_' . $workspace
->id()] = [
'title' => $this
->t('View the %workspace workspace', [
'%workspace' => $workspace
->label(),
]),
'description' => $this
->t('View the %workspace workspace and content within it', [
'%workspace' => $workspace
->label(),
]),
];
return $perms;
}