TourInterface.php 1.21 KB
Newer Older
1
2
3
4
<?php

/**
 * @file
5
 * Contains \Drupal\tour\Entity\TourInterface.
6
7
8
9
10
11
12
13
14
15
16
17
 */

namespace Drupal\tour;

use Drupal\Core\Config\Entity\ConfigEntityInterface;

/**
 * Provides an interface defining a tour entity.
 */
interface TourInterface extends ConfigEntityInterface {

  /**
18
   * The routes that this tour will appear on.
19
20
   *
   * @return array
21
   *   Returns array of routes for the tour.
22
   */
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  public function getRoutes();

  /**
   * Whether the tour matches a given set of route parameters.
   *
   * @param string $route_name
   *   The route name the parameters are for.
   * @param array $route_params
   *   Associative array of raw route params.
   *
   * @return bool
   *   TRUE if the tour matches the route parameters.
   */
  public function hasMatchingRoute($route_name, $route_params);
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

  /**
   * Returns tip plugin.
   *
   * @param string $id
   *   The identifier of the tip.
   *
   * @return \Drupal\tour\TipPluginInterface
   *   The tip plugin.
   */
  public function getTip($id);

  /**
   * Returns the tips for this tour.
   *
   * @return array
   *   An array of tip plugins.
   */
  public function getTips();

57
58
59
60
61
  /**
   * Resets the statically cached keyed routes.
   */
  public function resetKeyedRoutes();

62
}