function finder::render in Finder 7.2
Finder render.
Generate output of the finder.
2 calls to finder::render()
- finder::block in includes/
finder.inc - Finder block.
- finder::page in includes/
finder.inc - Finder page.
File
- includes/
finder.inc, line 418 - finder.inc
Class
- finder
- An object to contain all of the data to generate a finder, plus the member functions to build the finder, and render the output.
Code
function render() {
finder_inc('form');
module_invoke_all('finder_render', $this);
$this
->build();
$this->build_id = 'finder-' . $this->display . '-' . $this->name . '-wrapper';
// Always get the form in order to populate the form_state in case there are results we need to present.
// The form building function will not spend resources building elements if it doesn't need to.
// to do: this non form_on_page get_form may only be needed when hiding url args?
// @todo: this comment may no longer be relevant, and this call may not be needed anymore.
$form = drupal_get_form('finder_form_' . $this->name, $this);
if ($this->display != 'page' || $this->display == 'page' && $this
->setting('form_on_page')) {
$output['form'] = $form;
}
$output['results'] = $this
->results();
drupal_add_css(drupal_get_path('module', 'finder') . '/finder.css');
$this->render = $output;
$this->render['#prefix'] = '<div id="' . $this->build_id . '" class="finder-wrapper">';
$this->render['#suffix'] = '</div>';
drupal_alter('finder_render', $this);
return $this->render;
}