function finder_ajax in Finder 7.2
Same name and namespace in other branches
- 7 finder.module \finder_ajax()
Ajax callback; get finder ajax output.
Parameters
$form: The form.
$form_state: The form state.
Return value
Finder ajax output.
1 string reference to 'finder_ajax'
- finder_form in includes/
form.inc - FAPI definition for the finder form.
File
- ./
finder.module, line 130 - The finder module.
Code
function finder_ajax($form, $form_state) {
finder_inc('build');
// Get the finder.
$finder = $form_state['finder'];
$finder
->build();
// Force the json'd finder output to hide args.
$finder->settings['url'] = 'disabled';
// Set the display mode which was worked out on the last form load.
$finder->display = $form_state['ajax_display'];
// Inform any scripts that we're in an ajax context.
$finder->ajax = TRUE;
// Set the form state in the static cache.
finder_form_state($finder, $form_state);
// Render the finder output.
return $finder
->render();
}