annotate core/modules/tour/src/TourInterface.php @ 19:fa3358dc1485 tip

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