You are here

public function EntityAccess::entityCreateAccess in Workspace 8

Same name and namespace in other branches
  1. 8.2 src/EntityAccess.php \Drupal\workspace\EntityAccess::entityCreateAccess()

Hook bridge.

Parameters

\Drupal\Core\Session\AccountInterface $account:

array $context:

$entity_bundle:

Return value

\Drupal\Core\Access\AccessResult

See also

hook_entity_create_access()

File

src/EntityAccess.php, line 84

Class

EntityAccess
Service wrapper for hooks relating to entity access control.

Namespace

Drupal\workspace

Code

public function entityCreateAccess(AccountInterface $account, array $context, $entity_bundle) {

  // Workspaces themselves are handled by another hook. Ignore them here.
  if ($entity_bundle == 'workspace') {
    return AccessResult::neutral();
  }
  return $this
    ->bypassAccessResult($account);
}