function entity_page_access

Generic access callback for entity pages.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity for which access is being checked.

string $operation: (optional) The operation being performed on the entity. Defaults to 'view'.

Return value

bool TRUE if the access is granted. FALSE if access is denied.

5 string references to 'entity_page_access'
comment_menu in drupal/core/modules/comment/comment.module
Implements hook_menu().
custom_block_menu in drupal/core/modules/block/custom_block/custom_block.module
Implements hook_menu().
custom_block_test_menu in drupal/core/modules/block/custom_block/tests/modules/custom_block_test/custom_block_test.module
Implements hook_menu().
taxonomy_menu in drupal/core/modules/taxonomy/taxonomy.module
Implements hook_menu().
user_menu in drupal/core/modules/user/user.module
Implements hook_menu().

File

drupal/core/includes/entity.inc, line 811
Entity API for handling entities like nodes or users.

Code

function entity_page_access(EntityInterface $entity, $operation = 'view') {
  return $entity
    ->access($operation);
}