You are here

function contentimport_preprocess_page in Content Import 8

Same name and namespace in other branches
  1. 8.9 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(). Used to add css and js library to content import page.

File

./contentimport.module, line 19
This module is to import content from CSV file

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';
  }
}