You are here

function contentimport_preprocess_page in Content Import 8.9

Same name and namespace in other branches
  1. 8 contentimport.module \contentimport_preprocess_page()
  2. 8.3 contentimport.module \contentimport_preprocess_page()
  3. 8.4 contentimport.module \contentimport_preprocess_page()

Implements hook_preprocess_page().

File

./contentimport.module, line 19
Module file for Contentimport.

Code

function contentimport_preprocess_page(&$variables) {
  $variables['page']['#cache']['contexts'][] = 'route';
  $urlRoute = \Drupal::routeMatch()
    ->getRouteName();
  if ($urlRoute == 'contentimport.admin_settings') {
    $variables['#attached']['library'][] = 'contentimport/common-styling';
  }
}