You are here

function ldap_feeds_query_legend in Lightweight Directory Access Protocol (LDAP) 8.2

Same name and namespace in other branches
  1. 7.2 ldap_feeds/ldap_feeds.module \ldap_feeds_query_legend()
  2. 7 ldap_feeds/ldap_feeds.module \ldap_feeds_query_legend()

add additional data to mapping form for ldap query fetcher

1 call to ldap_feeds_query_legend()
ldap_feeds_form_feeds_ui_mapping_form_alter in ldap_feeds/ldap_feeds.module
show some sample ldap user data to help with mapping interface

File

ldap_feeds/ldap_feeds.module, line 109

Code

function ldap_feeds_query_legend(&$form, $importer) {
  $source = feeds_source($importer->id);
  $fetcher = feeds_plugin('FeedsLdapQueryFetcher', $source->importer->id);

  //dpm((array)$fetcher);  dpm((array)$source->importer->parser->ldap_result);

  // $fetcher_result = new FeedsLdapQueryFetcher($source->config);
  // $records = $fetcher->getRaw(); // FeedsSource $source
  // dpm($records);
  // foreach ($records[0] as $field_name => $value) {
  //  $sources[$field_name] = array(
  //    'name' => array('#markup' => $field_name),
  //   'description' => array('#markup' =>  _ldap_feeds_query_legend($records, $field_name)));
  // }
  // $form['legendset']['#description'] = t('Name column is the value that should go in the SOURCE column above.  Description column are from first few records of query in fetcher.', $tokens);
  // $form['legendset']['legend']['sources'] = $sources;
}