search_data

Versions
4.6 – 7
search_data($keys = NULL, $type = 'node')

Perform a standard search on the given keys, and return the formatted results.

Related topics

▾ 1 function calls search_data()

search_view in modules/search/search.pages.inc
Menu callback; presents the search form and/or search results.

Code

modules/search/search.module, line 1155

<?php
function search_data($keys = NULL, $type = 'node') {

  if (isset($keys)) {
    if (module_hook($type, 'search')) {
      $results = module_invoke($type, 'search', 'search', $keys);
      if (isset($results) && is_array($results) && count($results)) {
        if (module_hook($type, 'search_page')) {
          return module_invoke($type, 'search_page', $results);
        }
        else {
          return theme('search_results', $results, $type);
        }
      }
    }
  }
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.