function units_entity_access in Units of Measurement 7
Same name and namespace in other branches
- 7.2 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 188 - 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;
}