You are here

function notifications_node_autocomplete_title in Notifications 7

Same name and namespace in other branches
  1. 6.4 includes/node.inc \notifications_node_autocomplete_title()
  2. 6 notifications.node.inc \notifications_node_autocomplete_title()
  3. 6.2 notifications.node.inc \notifications_node_autocomplete_title()
  4. 6.3 notifications.node.inc \notifications_node_autocomplete_title()

Menu callback; Retrieve a pipe delimited string of autocomplete suggestions for existing users

1 string reference to 'notifications_node_autocomplete_title'
notifications_menu in ./notifications.module
Implementation of hook_menu().

File

includes/node.inc, line 77
Notifications node API for use by plug-in modules providing node related features

Code

function notifications_node_autocomplete_title($string = '') {
  $matches = array();
  foreach (_notifications_node_references($string) as $id => $row) {

    // Add a class wrapper for a few required CSS overrides.
    $matches[$row['title'] . " [nid:{$id}]"] = '<div class="reference-autocomplete">' . $row['rendered'] . '</div>';
  }
  drupal_json_output($matches);
}