You are here

public function EntityAccess::workspaceCreateAccess in Workspace 8

Hook bridge.

Parameters

\Drupal\Core\Session\AccountInterface $account:

array $context:

$entity_bundle:

Return value

\Drupal\Core\Access\AccessResult

See also

hook_create_access()

hook_ENTITY_TYPE_create_access()

File

src/EntityAccess.php, line 161

Class

EntityAccess
Service wrapper for hooks relating to entity access control.

Namespace

Drupal\workspace

Code

public function workspaceCreateAccess(AccountInterface $account, array $context, $entity_bundle) {
  return AccessResult::allowedIfHasPermission($account, 'create_workspace');
}