SearchPageInterface.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace Drupal\search;
  3. use Drupal\Core\Config\Entity\ConfigEntityInterface;
  4. /**
  5. * Provides an interface defining a search page entity.
  6. */
  7. interface SearchPageInterface extends ConfigEntityInterface {
  8. /**
  9. * Returns the search plugin.
  10. *
  11. * @return \Drupal\search\Plugin\SearchInterface
  12. * The search plugin used by this search page entity.
  13. */
  14. public function getPlugin();
  15. /**
  16. * Sets the search plugin.
  17. *
  18. * @param string $plugin_id
  19. * The search plugin ID.
  20. */
  21. public function setPlugin($plugin_id);
  22. /**
  23. * Determines if this search page entity is currently the default search.
  24. *
  25. * @return bool
  26. * TRUE if this search page entity is the default search, FALSE otherwise.
  27. */
  28. public function isDefaultSearch();
  29. /**
  30. * Determines if this search page entity is indexable.
  31. *
  32. * @return bool
  33. * TRUE if this search page entity is indexable, FALSE otherwise.
  34. */
  35. public function isIndexable();
  36. /**
  37. * Returns the path for the search.
  38. *
  39. * @return string
  40. * The part of the path for this search page that comes after 'search'.
  41. */
  42. public function getPath();
  43. /**
  44. * Returns the weight for the page.
  45. *
  46. * @return int
  47. * The page weight.
  48. */
  49. public function getWeight();
  50. }