You are here

interface SearchPageRepositoryInterface in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/search/src/SearchPageRepositoryInterface.php \Drupal\search\SearchPageRepositoryInterface

Provides the interface for a repository Search Page entities.

Hierarchy

Expanded class hierarchy of SearchPageRepositoryInterface

All classes that implement SearchPageRepositoryInterface

5 files declare their use of SearchPageRepositoryInterface
SearchBlockForm.php in core/modules/search/src/Form/SearchBlockForm.php
Contains \Drupal\search\Form\SearchBlockForm.
SearchController.php in core/modules/search/src/Controller/SearchController.php
Contains \Drupal\search\Controller\SearchController.
SearchLocalTask.php in core/modules/search/src/Plugin/Derivative/SearchLocalTask.php
Contains \Drupal\search\Plugin\Derivative\SearchLocalTask.
SearchPageFormBase.php in core/modules/search/src/Form/SearchPageFormBase.php
Contains \Drupal\search\Form\SearchPageFormBase.
SearchPageRoutes.php in core/modules/search/src/Routing/SearchPageRoutes.php
Contains \Drupal\search\Routing\SearchPageRoutes.

File

core/modules/search/src/SearchPageRepositoryInterface.php, line 13
Contains \Drupal\search\SearchPageRepositoryInterface.

Namespace

Drupal\search
View source
interface SearchPageRepositoryInterface {

  /**
   * Returns all active search page entities.
   *
   * @return \Drupal\search\SearchPageInterface[]
   *   An array of active search page entities.
   */
  public function getActiveSearchPages();

  /**
   * Returns whether search is active.
   *
   * @return bool
   *   TRUE if at least one search is active, FALSE otherwise.
   */
  public function isSearchActive();

  /**
   * Returns all active, indexable search page entities.
   *
   * @return \Drupal\search\SearchPageInterface[]
   *   An array of indexable search page entities.
   */
  public function getIndexableSearchPages();

  /**
   * Returns the default search page.
   *
   * @return \Drupal\search\SearchPageInterface|bool
   *   The search page entity, or FALSE if no pages are active.
   */
  public function getDefaultSearchPage();

  /**
   * Sets a given search page as the default.
   *
   * @param \Drupal\search\SearchPageInterface $search_page
   *   The search page entity.
   *
   * @return static
   */
  public function setDefaultSearchPage(SearchPageInterface $search_page);

  /**
   * Clears the default search page.
   */
  public function clearDefaultSearchPage();

  /**
   * Sorts a list of search pages.
   *
   * @param \Drupal\search\SearchPageInterface[] $search_pages
   *   The unsorted list of search pages.
   *
   * @return \Drupal\search\SearchPageInterface[]
   *   The sorted list of search pages.
   */
  public function sortSearchPages($search_pages);

}

Members

Namesort descending Modifiers Type Description Overrides
SearchPageRepositoryInterface::clearDefaultSearchPage public function Clears the default search page. 1
SearchPageRepositoryInterface::getActiveSearchPages public function Returns all active search page entities. 1
SearchPageRepositoryInterface::getDefaultSearchPage public function Returns the default search page. 1
SearchPageRepositoryInterface::getIndexableSearchPages public function Returns all active, indexable search page entities. 1
SearchPageRepositoryInterface::isSearchActive public function Returns whether search is active. 1
SearchPageRepositoryInterface::setDefaultSearchPage public function Sets a given search page as the default. 1
SearchPageRepositoryInterface::sortSearchPages public function Sorts a list of search pages. 1