function MediaTestEmbedHooks::entityAccess

Implements hook_entity_access().

File

core/modules/media/tests/modules/media_test_embed/src/Hook/MediaTestEmbedHooks.php, line 30

Class

MediaTestEmbedHooks
Hook implementations for media_test_embed.

Namespace

Drupal\media_test_embed\Hook

Code

public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account) {
    return AccessResult::neutral()->addCacheTags([
        '_media_test_embed_filter_access:' . $entity->getEntityTypeId() . ':' . $entity->id(),
    ]);
}

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