contentimport.module in Content Import 8
Same filename and directory in other branches
This module is to import content from CSV file
File
contentimport.moduleView 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
Name | Description |
---|---|
contentimport_preprocess_page | Implements hook_preprocess_page(). Used to add css and js library to content import page. |