You are here

function crm_core_default_matching_engine_menu in CRM Core 7

Implements hook_menu().

File

modules/crm_core_default_matching_engine/crm_core_default_matching_engine.module, line 25
The default matching engine for CRM Core. Identifies duplicate contacts in the system using criteria defined by users through the configuration tools.

Code

function crm_core_default_matching_engine_menu() {
  $items = array();
  $items['admin/config/crm-core/match/default_match'] = array(
    'title' => 'Default matching engine configuration',
    'description' => 'Default matching engine configuration. Per contact type matching rules.',
    'access arguments' => array(
      'administer default matching engine',
    ),
    'page callback' => 'crm_core_default_matching_engine_config_page',
    'file' => 'crm_core_default_matching_engine.admin.inc',
  );
  foreach (crm_core_contact_types() as $type => $info) {
    $items['admin/config/crm-core/match/default_match/' . $type . '/edit'] = array(
      'title' => 'Matching Rules for @type',
      'title arguments' => array(
        '@type' => $info->name,
      ),
      'description' => 'Matching Rules for %type',
      'description arguments' => array(
        '%type' => $info->name,
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'crm_core_default_matching_engine_form',
        5,
      ),
      'access arguments' => array(
        'administer default matching engine',
      ),
      'file' => 'crm_core_default_matching_engine.admin.inc',
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}