Generic access callback for entity pages.
\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'.
bool TRUE if the access is granted. FALSE if access is denied.
function entity_page_access(EntityInterface $entity, $operation = 'view') {
return $entity
->access($operation);
}