You are here

function uuid_link_autocomplete in UUID Link 6

Same name and namespace in other branches
  1. 7 uuid_link.module \uuid_link_autocomplete()

Autocomplete callback for entities.

1 string reference to 'uuid_link_autocomplete'
uuid_link_menu in ./uuid_link.module
Implements hook_menu().

File

./uuid_link.module, line 282
Provides a filter and UI for adding links to entities that are not affected by changes in URL alias.

Code

function uuid_link_autocomplete($type, $string = '') {
  $matches = array();
  if ($type == 'node') {
    $matches = _uuid_link_autocomplete_node($string);
  }
  elseif ($type == 'term') {
    $matches = _uuid_link_autocomplete_term($string);
  }
  elseif ($type == 'vocabulary') {
    $matches = _uuid_link_autocomplete_vocabulary($string);
  }
  elseif ($type == 'user') {
    $matches = _uuid_link_autocomplete_user($string);
  }
  drupal_json($matches);
}