You are here

function simple_ldap_user_simple_ldap_data_handlers in Simple LDAP 7.2

Implements HOOK_simple_ldap_data_handlers()

File

simple_ldap_user/simple_ldap_user.module, line 739
Main simple_ldap_user module file.

Code

function simple_ldap_user_simple_ldap_data_handlers() {
  $handlers_file = drupal_get_path('module', 'simple_ldap_user') . '/simple_ldap_user.ldap_handlers.inc';
  $handlers = array(
    'text' => array(
      'import_callback' => 'simple_ldap_user_translate_basic_ldap_to_drupal',
      'export_callback' => 'simple_ldap_user_translate_basic_drupal_to_ldap',
      'file' => $handlers_file,
    ),
    'file' => array(
      'import_callback' => 'simple_ldap_user_translate_file_ldap_to_drupal',
      'export_callback' => 'simple_ldap_user_translate_file_drupal_to_ldap',
      'file' => $handlers_file,
    ),
    'taxonomy_term_reference' => array(
      'import_callback' => 'simple_ldap_user_translate_term_ldap_to_drupal',
      'export_callback' => 'simple_ldap_user_translate_term_drupal_to_ldap',
      'file' => $handlers_file,
    ),
    'url' => array(
      'import_callback' => 'simple_ldap_user_translate_url_ldap_to_drupal',
      'export_callback' => 'simple_ldap_user_translate_url_drupal_to_ldap',
      'file' => $handlers_file,
    ),
    'datetime' => array(
      'import_callback' => 'simple_ldap_user_translate_datetime_ldap_to_drupal',
      'export_callback' => 'simple_ldap_user_translate_datetime_drupal_to_ldap',
      'file' => $handlers_file,
    ),
    '#default' => array(
      'import_callback' => 'simple_ldap_user_default_import_handler',
      'export_callback' => 'simple_ldap_user_default_export_handler',
      'file' => $handlers_file,
    ),
  );

  // Some field types have similar structure
  $handlers['number_integer'] = $handlers['text'];
  $handlers['text_long'] = $handlers['text'];
  $handlers['list_text'] = $handlers['text'];
  $handlers['image'] = $handlers['file'];
  return $handlers;
}