You are here

function entity_print_view_access in Entity Print 7

Function to check for entity view permission.

1 call to entity_print_view_access()
entity_print_access in ./entity_print.module
Validate that the current user has access.

File

./entity_print.module, line 81
Print any entity.

Code

function entity_print_view_access($entity_type, $entity_id) {
  if ($entities = entity_load($entity_type, array(
    $entity_id,
  ))) {
    $entity = array_pop($entities);
    return entity_access('view', $entity_type, $entity);
  }
  return FALSE;
}