You are here

function units_entity_access in Units of Measurement 7.2

Same name and namespace in other branches
  1. 7 units.module \units_entity_access()

Access callback for entity types 'units_measure' and 'units_unit'.

Parameters

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

object $entity: Entity object on which the operation is requested to be performed

object $account: Fully loaded user object of the account who requests to perform the operation

string $entity_type: Entity type on which the operation is requested to be performed

Return value

bool Whether access has been granted

1 string reference to 'units_entity_access'
units_entity_info in ./units.module
Implements hook_entity_info().

File

./units.module, line 174
Provide API for managing and converting units of measurement.

Code

function units_entity_access($op, $entity, $account, $entity_type) {

  // There is no reason why we would limit access to 'units_measure' or
  // 'units_unit' entities.
  return TRUE;
}