function forena_query_autocomplete in Forena Reports 7.4
Same name and namespace in other branches
- 8 forena_query/forena_query.inc \forena_query_autocomplete()
- 7.5 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.module - Implementation of hook_menu.
File
- ./
forena_query.inc, line 289
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);
}