public function EntityAccess::entityAccess in Workspace 8
Hook bridge.
Parameters
\Drupal\Core\Entity\EntityInterface $entity:
string $operation:
\Drupal\Core\Session\AccountInterface $account:
Return value
\Drupal\Core\Access\AccessResult
See also
File
- src/
EntityAccess.php, line 63
Class
- EntityAccess
- Service wrapper for hooks relating to entity access control.
Namespace
Drupal\workspaceCode
public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account) {
// Workspaces themselves are handled by another hook. Ignore them here.
if ($entity
->getEntityTypeId() == 'workspace') {
return AccessResult::neutral();
}
return $this
->bypassAccessResult($account);
}