You are here

function _search_autocomplete_get_items in Search Autocomplete 7.4

Same name and namespace in other branches
  1. 6.4 search_autocomplete.form.treelist.inc \_search_autocomplete_get_items()
  2. 6.2 search_autocomplete.form.treelist.inc \_search_autocomplete_get_items()
  3. 7.2 search_autocomplete.form.treelist.inc \_search_autocomplete_get_items()
  4. 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 search forms.

File

./search_autocomplete.form.treelist.inc, line 196
Search Autocomplete Display the list of form to autocomplete and theme it as a draggable table.

Code

function _search_autocomplete_get_items() {

  // 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);
}