3 namespace Drupal\search;
6 * Provides the interface for a repository Search Page entities.
8 interface SearchPageRepositoryInterface {
11 * Returns all active search page entities.
13 * @return \Drupal\search\SearchPageInterface[]
14 * An array of active search page entities.
16 public function getActiveSearchPages();
19 * Returns whether search is active.
22 * TRUE if at least one search is active, FALSE otherwise.
24 public function isSearchActive();
27 * Returns all active, indexable search page entities.
29 * @return \Drupal\search\SearchPageInterface[]
30 * An array of indexable search page entities.
32 public function getIndexableSearchPages();
35 * Returns the default search page.
37 * @return \Drupal\search\SearchPageInterface|bool
38 * The search page entity, or FALSE if no pages are active.
40 public function getDefaultSearchPage();
43 * Sets a given search page as the default.
45 * @param \Drupal\search\SearchPageInterface $search_page
46 * The search page entity.
50 public function setDefaultSearchPage(SearchPageInterface $search_page);
53 * Clears the default search page.
55 public function clearDefaultSearchPage();
58 * Sorts a list of search pages.
60 * @param \Drupal\search\SearchPageInterface[] $search_pages
61 * The unsorted list of search pages.
63 * @return \Drupal\search\SearchPageInterface[]
64 * The sorted list of search pages.
66 public function sortSearchPages($search_pages);