function forena_query_autocomplete in Forena Reports 8
Same name and namespace in other branches
- 7.5 forena_query.inc \forena_query_autocomplete()
- 7.4 forena_query.inc \forena_query_autocomplete()
Standard drupal autocomplete that searches for tables.
Parameters
string $repos:
string $str:
1 string reference to 'forena_query_autocomplete'
- forena_query_menu in forena_query/
forena_query.module - Implementation of hook_menu
File
- forena_query/
forena_query.inc, line 289 - forena.datablock.inc Data block building and testing forms.
Code
function forena_query_autocomplete($repos = '', $str = '') {
$tables = array();
if ($repos && $str) {
$r = Frx::RepoMan()
->repository($repos);
if ($r && method_exists($r, 'searchTables')) {
$tables = $r
->searchTables($str);
$tables = array_combine($tables, $tables);
}
}
print drupal_json_output($tables);
}