function MediaTestEmbedHooks::entityAccess
Same name and namespace in other branches
- 11.x core/modules/media/tests/modules/media_test_embed/src/Hook/MediaTestEmbedHooks.php \Drupal\media_test_embed\Hook\MediaTestEmbedHooks::entityAccess()
Implements hook_entity_access().
Attributes
#[Hook('entity_access')]
File
-
core/
modules/ media/ tests/ modules/ media_test_embed/ src/ Hook/ MediaTestEmbedHooks.php, line 31
Class
- MediaTestEmbedHooks
- Hook implementations for media_test_embed.
Namespace
Drupal\media_test_embed\HookCode
public function entityAccess(EntityInterface $entity, $operation, AccountInterface $account) : AccessResultInterface {
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.