31590713fe675f52ab72180a4bf5cefd0c12df75
[yaffs-website] / web / core / modules / tour / src / TourInterface.php
1 <?php
2
3 namespace Drupal\tour;
4
5 use Drupal\Core\Config\Entity\ConfigEntityInterface;
6
7 /**
8  * Provides an interface defining a tour entity.
9  */
10 interface TourInterface extends ConfigEntityInterface {
11
12   /**
13    * The routes that this tour will appear on.
14    *
15    * @return array
16    *   Returns array of routes for the tour.
17    */
18   public function getRoutes();
19
20   /**
21    * Whether the tour matches a given set of route parameters.
22    *
23    * @param string $route_name
24    *   The route name the parameters are for.
25    * @param array $route_params
26    *   Associative array of raw route params.
27    *
28    * @return bool
29    *   TRUE if the tour matches the route parameters.
30    */
31   public function hasMatchingRoute($route_name, $route_params);
32
33   /**
34    * Returns tip plugin.
35    *
36    * @param string $id
37    *   The identifier of the tip.
38    *
39    * @return \Drupal\tour\TipPluginInterface
40    *   The tip plugin.
41    */
42   public function getTip($id);
43
44   /**
45    * Returns the tips for this tour.
46    *
47    * @return array
48    *   An array of tip plugins.
49    */
50   public function getTips();
51
52   /**
53    * Gets the module this tour belongs to.
54    *
55    * @return string
56    *   The module this tour belongs to.
57    */
58   public function getModule();
59
60   /**
61    * Resets the statically cached keyed routes.
62    */
63   public function resetKeyedRoutes();
64
65 }