function crm_core_user_sync_get_related_entity in CRM Core 7
Same name and namespace in other branches
- 8.2 modules/crm_core_user_sync/crm_core_user_sync.module \crm_core_user_sync_get_related_entity()
Retrieves the related entity based on entity type, ids and relation type.
4 calls to crm_core_user_sync_get_related_entity()
- crm_core_user_sync_get_contacts_from_uids in modules/
crm_core_user_sync/ crm_core_user_sync.module - Retrieves the related contacts for given uids.
- crm_core_user_sync_get_contact_from_uid in modules/
crm_core_user_sync/ crm_core_user_sync.module - Retrieves the related contacts for given uid(s).
- crm_core_user_sync_get_users_from_contact_ids in modules/
crm_core_user_sync/ crm_core_user_sync.module - Retrieves the related users for given contact ids.
- crm_core_user_sync_get_user_from_contact_id in modules/
crm_core_user_sync/ crm_core_user_sync.module - Retrieves the related users for given contact id(s).
File
- modules/
crm_core_user_sync/ crm_core_user_sync.module, line 423
Code
function crm_core_user_sync_get_related_entity($entity_type, $entity_id, $relation_type = 'crm_core_user_sync') {
if (is_array($entity_id)) {
return _crm_core_user_sync_get_related_entities($entity_type, $entity_id, $relation_type);
}
elseif (is_numeric($entity_id)) {
return _crm_core_user_sync_get_related_entity($entity_type, $entity_id, $relation_type);
}
return FALSE;
}