function entity_rules_integration_event_access in Entity API 7
Rules integration access callback.
1 string reference to 'entity_rules_integration_event_access'
File
- ./
entity.rules.inc, line 111 - Provides Rules integration for entities provided via the CRUD API.
Code
function entity_rules_integration_event_access($type, $event_name) {
// Cut of _insert/_update/.. from the event name.
$entity_type = substr($event_name, 0, strrpos($event_name, '_'));
$result = entity_access('view', $entity_type);
// If no access callback is given, just grant access for viewing.
return isset($result) ? $result : TRUE;
}