You are here

contentimport.module in Content Import 8

This module is to import content from CSV file

File

contentimport.module
View source
<?php

/**
 * @file
 * This module is to import content from CSV file
 */
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\node\Entity;

/**
 * Implements hook_preprocess_page().
 * Used to add css and js library to content import page.
 * 
 */
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';
  }
}

Functions

Namesort descending Description
contentimport_preprocess_page Implements hook_preprocess_page(). Used to add css and js library to content import page.