function _search_autocomplete_get_items in Search Autocomplete 7.2
Same name and namespace in other branches
- 6.4 search_autocomplete.form.treelist.inc \_search_autocomplete_get_items()
- 6.2 search_autocomplete.form.treelist.inc \_search_autocomplete_get_items()
- 7.4 search_autocomplete.form.treelist.inc \_search_autocomplete_get_items()
- 7.3 search_autocomplete.form.treelist.inc \_search_autocomplete_get_items()
Helper function: get the forms from database and render them hierarchically return the items sorted
1 call to _search_autocomplete_get_items()
- search_autocomplete_treelist_form in ./
search_autocomplete.form.treelist.inc - Menu Callback: create the form to list the searchforms
File
- ./
search_autocomplete.form.treelist.inc, line 171 - Search Autocomplete Display the list of form to autocomplete and themis it as a draggable table.
Code
function _search_autocomplete_get_items() {
$items = array();
// get data in database and fetch it
$result = db_select('search_autocomplete_forms', 'f')
->fields('f')
->orderBy('weight')
->execute()
->fetchAllAssoc('fid');
// order the list
return _search_autocomplete_get_ordered_list(0, $result);
}