You are here

function brightcove_field_entity_access in Brightcove Video Connect 7.4

Helper function to prepare parameters to entity_access() function.

Parameters

$op: The operation being performed. One of 'view', 'update', 'create' or 'delete'.

$entity_type: The entity type of the entity to check for.

$entity_id: Optionally an id belonging to the checked entity.

$account: The user to check for. Leave it to NULL to check for the global user.

Return value

boolean Whether access is allowed or not. If the entity type does not specify any access information, NULL is returned.

See also

brightcove_field_menu()

entity_access()

File

brightcove_field/brightcove_field.module, line 1576
Brightcove field module provides a Content Construction Kit module to developers, allowing them to browse videos in their Brightcove Studio and upload them.

Code

function brightcove_field_entity_access($op, $entity_type, $entity_id = NULL, $account = NULL) {
  $entity = entity_load($entity_type, array(
    $entity_id,
  ));
  $entity = reset($entity);
  return entity_access($op, $entity_type, $entity, $account);
}