Mercurial > hg > cmmr2012-drupal-site
diff core/modules/tour/src/TourInterface.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/core/modules/tour/src/TourInterface.php Thu Jul 05 14:24:15 2018 +0000 @@ -0,0 +1,65 @@ +<?php + +namespace Drupal\tour; + +use Drupal\Core\Config\Entity\ConfigEntityInterface; + +/** + * Provides an interface defining a tour entity. + */ +interface TourInterface extends ConfigEntityInterface { + + /** + * The routes that this tour will appear on. + * + * @return array + * Returns array of routes for the tour. + */ + 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); + + /** + * 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(); + + /** + * Gets the module this tour belongs to. + * + * @return string + * The module this tour belongs to. + */ + public function getModule(); + + /** + * Resets the statically cached keyed routes. + */ + public function resetKeyedRoutes(); + +}