You are here

public static function OpignoTourFunctions::checkRouteTour in Opigno tour 8

Same name and namespace in other branches
  1. 3.x src/OpignoTourFunctions.php \Drupal\opigno_tour\OpignoTourFunctions::checkRouteTour()

Checks if current route has a Guided tour.

1 call to OpignoTourFunctions::checkRouteTour()
opigno_tour_preprocess_page in ./opigno_tour.module
Implements hook_preprocess_page().

File

src/OpignoTourFunctions.php, line 15

Class

OpignoTourFunctions
Class OpignoTourFunctions.

Namespace

Drupal\opigno_tour

Code

public static function checkRouteTour($route_name) {
  $routes = [
    'view.frontpage.page_1',
    'view.opigno_training_catalog.training_catalogue',
    'opigno_learning_path.achievements',
    'entity.group.canonical',
    'entity.group.edit_form',
  ];
  if (in_array($route_name, $routes)) {
    return TRUE;
  }
  return FALSE;
}