You are here

function opigno_learning_path_preprocess_html in Opigno Learning path 8

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

Implements hook_preprocess_html().

File

./opigno_learning_path.module, line 257
Contains opigno_learning_path.module.

Code

function opigno_learning_path_preprocess_html(&$variables) {

  // Remove admin bar for item form (included in iframe).
  if (\Drupal::routeMatch()
    ->getRouteName() == 'opigno_learning_path.manager.get_item_form') {
    unset($variables['page_top']);
  }
  if (opigno_learning_path_is_lp_route()) {
    $variables['attributes']['class'][] = 'admin-learning-path';
  }
}