You are here

function forena_data_block_autocomplete in Forena Reports 6

Same name and namespace in other branches
  1. 6.2 forena.module \forena_data_block_autocomplete()
  2. 7.5 forena.module \forena_data_block_autocomplete()
  3. 7 forena.module \forena_data_block_autocomplete()
  4. 7.2 forena.module \forena_data_block_autocomplete()
  5. 7.3 forena.module \forena_data_block_autocomplete()
  6. 7.4 forena.module \forena_data_block_autocomplete()

Auto complete for data blocks

Parameters

$string:

Return value

unknown_type

1 string reference to 'forena_data_block_autocomplete'
forena_menu in ./forena.module
Implementation of hook_menu.

File

./forena.module, line 200

Code

function forena_data_block_autocomplete($string = '') {
  require_once 'forena.admin.inc';
  $data_blocks = forena_user_data_blocks($string);
  if ($data_blocks) {
    $temp = array_values($data_blocks);
    $data_blocks = array_combine($temp, $temp);
  }
  else {
    $data_blocks = array();
  }
  print drupal_json($data_blocks);
}