You are here

function finder_wizard_finder_render in Finder 7.2

Implements hook_finder_render().

File

modules/finder_wizard/finder_wizard.module, line 182
The Finder page module.

Code

function finder_wizard_finder_render($finder) {

  // Calculate pages.
  // $finder->finder_wizard can be used during finder form/find operations to
  // determine if finder_wizard functionality applies.
  foreach ($finder->elements as &$finder_element) {
    if ($finder_element->element == 'page') {
      $finder->finder_wizard[$finder_element->id][] = $finder_element->id;
    }
    elseif (!empty($finder_element->parent) && $finder->elements[$finder_element->parent]->element == 'page') {
      $finder->finder_wizard[$finder_element->parent][] = $finder_element->id;
    }
  }
  if (!empty($finder->finder_wizard)) {

    // Add another page for results.
    $finder->finder_wizard[$finder
      ->setting('finder_wizard_url_results')] = array();
  }
}