function crm_core_match_crm_core_contact_match in CRM Core 7
Implements hook_crm_core_contact_match().
File
- modules/
crm_core_match/ crm_core_match.module, line 25 - Manages matching engines for identifying duplicate contacts in CRM Core. Allows CRM Core to install, enable and disable matching engines.
Code
function crm_core_match_crm_core_contact_match($values) {
// Get a list of all matching engines for a contact.
$engines =& drupal_static(__FUNCTION__);
if (!is_array($engines)) {
$engines = crm_core_match_get_engines();
}
// Go through each and look for matches.
$matches = array();
if (count($engines) > 0) {
foreach ($engines as $engine) {
$engine
->execute($values['contact'], $matches);
}
}
$values['matches'] = array_merge($values['matches'], $matches);
}