function domain_entity_get_entity_field_name in Domain Access Entity 7
Return the name of the field for an entity type.
Parameters
String $entity_type: The type of the entity that hold the field.
3 calls to domain_entity_get_entity_field_name()
- domain_entity_entity_access_callback in ./
domain_entity.module - Entity access callback.
- domain_entity_types_enable_domain_field in ./
domain_entity.module - Helper function to active domain field on bundles of entity types.
- domain_entity_ui_submit in ./
domain_entity.admin.inc - Submit handler for the domain entity form.
File
- ./
domain_entity.module, line 894 - Defines field (e.g. domain_entity) for entities, and access query alter.
Code
function domain_entity_get_entity_field_name($entity_type) {
$field_name = 'domain_' . $entity_type;
if (strlen($field_name) > 21) {
$field_name = substr('domain_' . md5($field_name), 0, -7);
}
return $field_name;
}