function ldap_feeds_query_legend in Lightweight Directory Access Protocol (LDAP) 7
Same name and namespace in other branches
- 8.2 ldap_feeds/ldap_feeds.module \ldap_feeds_query_legend()
- 7.2 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 99
Code
function ldap_feeds_query_legend(&$form) {
/**
$importer = feeds_importer($form['#importer']->id);
$source = feeds_source($form['#importer']->id);
$fetcher_result = new FeedsLdapQueryFetcher($source->config);
$records = $fetcher_result->getRaw(); // FeedsSource $source
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;
**/
}