You are here

function opigno_learning_path_theme_suggestions_alter in Opigno Learning path 8

Same name and namespace in other branches
  1. 3.x opigno_learning_path.module \opigno_learning_path_theme_suggestions_alter()

Implements hook_theme_suggestions_alter().

File

./opigno_learning_path.module, line 238
Contains opigno_learning_path.module.

Code

function opigno_learning_path_theme_suggestions_alter(array &$suggestions, array $variables, $hook) {
  if (\Drupal::routeMatch()
    ->getRouteName() == 'opigno_learning_path.manager.get_item_form' && $hook == 'page') {
    $suggestions[] = 'opigno_learning_path_item_form';
  }
  if (opigno_learning_path_is_lp_route() && $hook == 'region' && in_array('region__content', $suggestions)) {
    $suggestions[] = 'region__content__admin__learning_path';
  }
}