You are here

function finder_results_ajax in Finder 7.2

Menu callback; get finder ajax results output.

Parameters

$finder: The finder object.

Return value

Finder ajax output.

1 string reference to 'finder_results_ajax'
finder_menu in ./finder.module
Implements hook_menu().

File

./finder.module, line 187
The finder module.

Code

function finder_results_ajax($finder) {
  finder_inc('form');
  $finder
    ->build();
  $finder->ajax = TRUE;
  $finder->settings['url'] = 'disabled';
  finder_form_state($finder, array(
    'values' => $_POST,
    'finished' => TRUE,
  ));
  $results = $finder
    ->results();
  drupal_json_output(array(
    'output' => render($results),
    'finder' => $finder->name,
  ));
  exit;
}