You are here

function apachesolr_search_page_list_all in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 apachesolr_search.admin.inc \apachesolr_search_page_list_all()
  2. 7 apachesolr_search.admin.inc \apachesolr_search_page_list_all()

Menu callback for the overview page showing custom search pages and blocks.

Return value

array $build

1 string reference to 'apachesolr_search_page_list_all'
apachesolr_search_menu in ./apachesolr_search.module
Implements hook_menu().

File

./apachesolr_search.admin.inc, line 40
Administrative settings for searching.

Code

function apachesolr_search_page_list_all() {
  $links['add_page'] = array(
    'title' => 'Add search page',
    'href' => 'admin/settings/apachesolr/search-pages/add',
  );
  $links['add_mlt'] = array(
    'title' => 'Add search block "More Like This"',
    'href' => 'admin/settings/apachesolr/search-pages/addblock',
  );
  $build['links'] = theme('links', $links);
  $build['pages'] = apachesolr_search_page_list_pages();
  $build['blocks'] = apachesolr_search_page_list_blocks();
  $build['config'] = drupal_get_form('apachesolr_search_pages_config_form');

  // Print in a similar way as the Drupal 7 version
  $build_print = NULL;
  foreach ($build as $print) {
    $build_print .= $print;
  }
  return $build_print;
}