You are here

function support_solr_block_view in Support Ticketing System 6

Implements hook_block_view().

1 call to support_solr_block_view()
support_solr_block in support_solr/support_solr.module
Implementation of hook_block(). Forwards to D7 style hooks.

File

support_solr/support_solr.module, line 170
Apache Solr search for support module.

Code

function support_solr_block_view($delta = '') {
  if (apachesolr_has_searched()) {

    // Get the query and response. Without these no blocks make sense.
    $response = apachesolr_static_response_cache();
    if (empty($response)) {
      return;
    }
    $query = apachesolr_current_query();
    $facets = apachesolr_get_enabled_facets('support_solr');

    /*
        if (empty($facets[$delta]) && ($delta != 'currentsearch')) {
          return;
        }*/
    $info = module_invoke_all('support_solr_info');
    return apachesolr_facet_block($response, $query, 'support_solr', $delta, $facets[$delta], $info[$delta]['filter_by'], $info[$delta]['facet_callback']);
  }
}