You are here

function workspaces_entity_access in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/workspaces/workspaces.module \workspaces_entity_access()

Implements hook_entity_access().

See also

\Drupal\workspaces\EntityAccess

File

core/modules/workspaces/workspaces.module, line 151
Provides full-site preview functionality for content staging.

Code

function workspaces_entity_access(EntityInterface $entity, $operation, AccountInterface $account) {
  return \Drupal::service('class_resolver')
    ->getInstanceFromDefinition(EntityAccess::class)
    ->entityOperationAccess($entity, $operation, $account);
}