function WorkspacesHooks::entityAccess

Implements hook_entity_access().

See also

\Drupal\workspaces\EntityAccess

File

core/modules/workspaces/src/Hook/WorkspacesHooks.php, line 187

Class

WorkspacesHooks
Hook implementations for workspaces.

Namespace

Drupal\workspaces\Hook

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.