function biblio_ipni_autocomplete_short_publication in Biblio Autocomplete 7
Same name and namespace in other branches
- 6 plugins/biblio_ipni/biblio_ipni.module \biblio_ipni_autocomplete_short_publication()
Gets a list of potential short (abbreviated) publication matches for the autocomplete
Parameters
$string: Text string to try and match
Return value
$return_matches An array of autocomplete results for use in biblio_autocomple_json(). Format: array( 'key' => 'value to put in biblio field', 'description' => 'can be the same as key or contain extra information to help use decide', 'provider' => 'source of the autocmplete information', )
1 string reference to 'biblio_ipni_autocomplete_short_publication'
- biblio_ipni_biblio_autocomplete_info in plugins/
biblio_ipni/ biblio_ipni.module - Implements hook_biblio_autocomplete_info().
File
- plugins/
biblio_ipni/ biblio_ipni.module, line 76 - Provides autocompletion of Biblio fields from IPNI.
Code
function biblio_ipni_autocomplete_short_publication($string) {
$ipni_matches = biblio_ipni_get_publication_data_short($string);
foreach ($ipni_matches as $result) {
$return_matches[] = array(
'key' => $result[2],
'description' => $result[2] . ' | ' . $result[3],
'provider' => 'IPNI',
);
}
return $return_matches;
}