You are here

function regcode_admin_ajax_categories in Registration codes 6

Autocomplete helper for categories

1 string reference to 'regcode_admin_ajax_categories'
regcode_menu in ./regcode.module
Implementation of hook_menu().

File

./regcode.admin.php, line 395
Functions and pages needed for the administration interface for the regcode module.

Code

function regcode_admin_ajax_categories($string) {
  $matches = array();
  if (!empty($string)) {
    module_load_include('regcode.api', 'regcode', 'php');
    $matches = regcode_get_categories($string, 10);
  }
  print drupal_to_js($matches);
}