function entityform_type_access in Entityform 7
Same name and namespace in other branches
- 7.2 entityform.module \entityform_type_access()
Access callback for the entity API.
1 string reference to 'entityform_type_access'
- entityform_entity_info in ./
entityform.module - Implement hook_entity_info().
File
- ./
entityform.module, line 345 - Module for the Entityform Entity - a starting point to create your own Entity and associated administration interface
Code
function entityform_type_access($op, $type = NULL, $account = NULL) {
// If coming from EntityDrupalWrapper::entityAccess then entity type will be sent
// This is used in EntityReferences module
// @see EntityDrupalWrapper->entityAccess()
if (isset($type) && is_object($type) && get_class($type) == 'EntityformType' && $op == 'view') {
return entityform_access('submit', $type, $account);
}
return user_access('administer entityform types', $account);
}