forked from lashab/csv_importer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcsv_importer.module
32 lines (29 loc) · 1.28 KB
/
csv_importer.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/**
* @file
* Contains csv_importer.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Url;
/**
* Implements hook_help().
*/
function csv_importer_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.csv_importer':
$output = '';
$output .= '<h3>' . t('CSV Importer') . '</h3>';
$output .= '<p>' . t('Import content from CSV files, by default it supports <strong>Node</strong>, <strong>Taxonomy</strong> and <strong>User</strong> import.') . '</p>';
$output .= '<h4>' . t('Usage') . '</h4>';
$output .= '<ul>';
$output .= '<li>' . t('Navigate <a href="@uri" target="_blank">here</a>', ['@uri' => Url::fromRoute('csv_importer.form')->toString()]) . '</li>';
$output .= '<li>' . t('Choose entity type') . '</li>';
$output .= '<li>' . t('Choose entity bundle (if any)') . '</li>';
$output .= '<li>' . t('Choose CSV file') . '</li>';
$output .= '<li>' . t('Press <strong>CSV import</strong>') . '</li>';
$output .= '</ul>';
$output .= '<h4>' . t('Documentation') . '</h4>';
$output .= '<a href="https://www.drupal.org/docs/8/modules/csv-importer" target="_blank">' . 'https://www.drupal.org/docs/8/modules/csv-importer' . '</a>';
return $output;
}
}