public function EntityAccess::entityCreateAccess in Workspace 8
Same name and namespace in other branches
- 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
File
- src/
EntityAccess.php, line 84
Class
- EntityAccess
- Service wrapper for hooks relating to entity access control.
Namespace
Drupal\workspaceCode
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);
}