function eck_entity_access in Entity Construction Kit (ECK) 7.3
Default access callback for ECK entities.
This is used as the default behavior when entity_access() is called to check access on an entity provided by ECK. Note that in addition to calls from within this own module, entity_access() is also called by other modules such as Rules, Entity Reference, etc. (although it is not consistently called throughout Drupal).
Parameters
string $op: The operation being performed. One of 'view', 'update', 'create' or 'delete'.
object $entity: An entity to check access for. If this is NULL, we are checking access for all entities of the given type. If this is a string (representing the bundle to check access for; see parallel example in node_access()) we are checking access for all entities of the given type and bundle.
object $account: The user to check access for. If this is NULL, access will be checked for the current user.
string $entity_type_name: A string representing the type of entity to check access for.
Return value
bool TRUE if access is granted, FALSE otherwise.
See also
1 string reference to 'eck_entity_access'
- eck__entity_type__info in ./
eck.entity_type.inc - Generate the entity info for a specific entity.
File
- ./
eck.permissions.inc, line 105 - Permissions.
Code
function eck_entity_access($op, $entity, $account, $entity_type_name) {
return eck_access($op, 'entity', $entity, $account);
}