You are here

protected function EntityAccess::createWorkspaceBypassPermission 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::createWorkspaceBypassPermission()
EntityAccess::workspacePermissions in src/EntityAccess.php
Returns an array of workspace-specific permissions.

File

src/EntityAccess.php, line 264

Class

EntityAccess
Service wrapper for hooks relating to entity access control.

Namespace

Drupal\workspace

Code

protected function createWorkspaceBypassPermission(WorkspaceInterface $workspace) {
  $perms['bypass_entity_access_workspace_' . $workspace
    ->id()] = [
    'title' => $this
      ->t('Bypass content entity access in %workspace workspace', [
      '%workspace' => $workspace
        ->label(),
    ]),
    'description' => $this
      ->t('Allow all Edit/Update/Delete permissions for all content in the %workspace workspace', [
      '%workspace' => $workspace
        ->label(),
    ]),
    'restrict access' => TRUE,
  ];
  return $perms;
}