You are here

function extended_file_field_entity_access in Extended File Field 7

Check access for an entity.

Duplicated from Entity API since we don't want a dependency on that whole module just for this.

See also

entity_access()

Related topics

1 call to extended_file_field_entity_access()
extended_file_field_field_formatter_view in ./extended_file_field.module
Implements hook_field_formatter_view().

File

./extended_file_field.module, line 729
Extends the core File field widget and provides a new formatter.

Code

function extended_file_field_entity_access($op, $entity_type, $entity = NULL, $account = NULL) {
  if (($info = entity_get_info()) && isset($info[$entity_type]['access callback'])) {
    return $info[$entity_type]['access callback']($op, $entity, $account, $entity_type);
  }
}