You are here

function crm_core_user_sync_menu in CRM Core 8.2

Same name and namespace in other branches
  1. 7 modules/crm_core_user_sync/crm_core_user_sync.module \crm_core_user_sync_menu()

Implements hook_menu()

File

modules/crm_core_user_sync/crm_core_user_sync.module, line 9

Code

function crm_core_user_sync_menu() {
  $items = array();
  if (\Drupal::moduleHandler()
    ->moduleExists('crm_core_ui')) {
    $items['admin/config/crm-core/user-sync'] = array(
      'title' => 'User Synchronization',
      'description' => 'Manage CRM Core user synchronization settings',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'crm_core_user_sync_admin_form',
      ),
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
      'weight' => 0,
    );
    $items['admin/config/crm-core/user-sync/settings'] = array(
      'title' => 'User Synchronization Settings',
      'weight' => -10,
      'type' => MENU_DEFAULT_LOCAL_TASK,
    );
    $items['admin/config/crm-core/user-sync/new'] = array(
      'title' => 'Add a new rule',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'crm_core_user_sync_admin_edit_rule_form',
        NULL,
      ),
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
      'type' => MENU_LOCAL_ACTION,
    );
    $items['admin/config/crm-core/user-sync/%/edit'] = array(
      'title' => 'Edit a rule',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'crm_core_user_sync_admin_edit_rule_form',
        4,
      ),
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
      'type' => MENU_CALLBACK,
    );
    $items['admin/config/crm-core/user-sync/%/delete'] = array(
      'title' => 'Delete a rule',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'crm_core_user_sync_admin_delete_rule_form',
        4,
      ),
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
    );
    $items['admin/config/crm-core/user-sync/%/enable'] = array(
      'title' => 'Delete a rule',
      'page callback' => 'crm_core_user_sync_admin_update_rule_status',
      'page arguments' => array(
        4,
        TRUE,
      ),
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
    );
    $items['admin/config/crm-core/user-sync/%/disable'] = array(
      'title' => 'Delete a rule',
      'page callback' => 'crm_core_user_sync_admin_update_rule_status',
      'page arguments' => array(
        4,
        FALSE,
      ),
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
    );
    $items['admin/config/crm-core/user-sync/contact-to-user-management/add'] = array(
      'title' => 'Add a new relation',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'crm_core_user_sync_edit_relation_form',
        NULL,
      ),
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
      'type' => MENU_LOCAL_ACTION,
    );
    $items['admin/config/crm-core/user-sync/contact-to-user-management/%relation/edit'] = array(
      'title' => 'Edit relation',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'crm_core_user_sync_edit_relation_form',
        5,
      ),
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
      'type' => MENU_CALLBACK,
    );
    $items['admin/config/crm-core/user-sync/contact-to-user-management/%relation/delete'] = array(
      'title' => 'Delete relation',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'crm_core_user_sync_delete_relation_form',
        5,
      ),
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
      'type' => MENU_CALLBACK,
    );
    $items['admin/config/crm-core/user-sync/contact-to-user-management/user-autocomplete/%'] = array(
      'page callback' => 'crm_core_user_sync_user_autocomplete',
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
      'type' => MENU_CALLBACK,
    );
    $items['admin/config/crm-core/user-sync/contact-to-user-management/contact-autocomplete/%'] = array(
      'page callback' => 'crm_core_user_sync_contact_autocomplete',
      'access arguments' => array(
        'administer user-sync',
      ),
      'file' => 'crm_core_user_sync.admin.inc',
      'type' => MENU_CALLBACK,
    );
  }
  return $items;
}