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