You are here

function ldap_views_views_data in Lightweight Directory Access Protocol (LDAP) 7

Same name and namespace in other branches
  1. 8.2 ldap_views/ldap_views.views.inc \ldap_views_views_data()
  2. 7.2 ldap_views/ldap_views.views.inc \ldap_views_views_data()

Implements hook_views_data().

File

ldap_views/ldap_views.views.inc, line 12
Definition of ldap_views module

Code

function ldap_views_views_data() {
  $data['ldap']['table']['group'] = t('LDAP Query');
  $data['ldap']['table']['base'] = array(
    'field' => 'dn',
    'title' => t('LDAP Query'),
    'help' => t('Data from LDAP Server.'),
    'query class' => 'ldap_views',
  );

  // basedn
  $data['ldap']['basedn'] = array(
    'title' => t('LDAP Base DN'),
    'help' => t('The LDAP search base entry'),
    'argument' => array(
      'handler' => 'ldap_views_handler_argument',
    ),
  );

  // filter
  // Generic column
  $data['ldap']['attribute'] = array(
    'title' => t('LDAP Attribute'),
    'help' => t('An attribute in LDAP Server'),
    'argument' => array(
      'handler' => 'ldap_views_handler_argument_attribute',
    ),
    'field' => array(
      'handler' => 'ldap_views_handler_field_attribute',
    ),
    'sort' => array(
      'handler' => 'ldap_views_handler_sort_attribute',
    ),
    'filter' => array(
      'handler' => 'ldap_views_handler_filter_attribute',
    ),
  );
  $data['ldap']['dn'] = array(
    'title' => t('DN'),
    'help' => t('Distinguished name'),
    'field' => array(
      'handler' => 'ldap_views_handler_field',
    ),
    'sort' => array(
      'handler' => 'ldap_views_handler_sort',
    ),
    'filter' => array(
      'handler' => 'views_handler_filter_string',
    ),
  );
  $data['ldap']['cn'] = array(
    'title' => t('CN'),
    'help' => t('Common name'),
    'argument' => array(
      'handler' => 'ldap_views_handler_argument',
    ),
    'field' => array(
      'handler' => 'ldap_views_handler_field',
    ),
    'sort' => array(
      'handler' => 'ldap_views_handler_sort',
    ),
    'filter' => array(
      'handler' => 'ldap_views_handler_filter',
    ),
  );
  $data['ldap']['objectClass'] = array(
    'title' => t('Object Class'),
    'help' => t('The LDAP objectClass'),
    'argument' => array(
      'handler' => 'ldap_views_handler_argument',
    ),
    'field' => array(
      'handler' => 'ldap_views_handler_field',
    ),
    'sort' => array(
      'handler' => 'ldap_views_handler_sort',
    ),
    'filter' => array(
      'handler' => 'ldap_views_handler_filter',
    ),
  );
  return $data;
}