-
Notifications
You must be signed in to change notification settings - Fork 0
/
mnn_reservations_import.feeds_importer_default.inc
91 lines (88 loc) · 2.56 KB
/
mnn_reservations_import.feeds_importer_default.inc
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
/**
* @file
* mnn_reservations_import.feeds_importer_default.inc
*/
/**
* Implements hook_feeds_importer_default().
*/
function mnn_reservations_import_feeds_importer_default() {
$export = array();
$feeds_importer = new stdClass;
$feeds_importer->disabled = FALSE; /* Edit this to true to make a default feeds_importer disabled initially */
$feeds_importer->api_version = 1;
$feeds_importer->id = 'mnn_reservations_import';
$feeds_importer->config = array(
'name' => 'mnn_reservations_import',
'description' => 'Import Reservation nodes with association to Producer, Project, and Inventory',
'fetcher' => array(
'plugin_key' => 'FeedsFileFetcher',
'config' => array(
'allowed_extensions' => 'txt csv tsv xml opml',
'direct' => FALSE,
),
),
'parser' => array(
'plugin_key' => 'FeedsCSVParser',
'config' => array(
'delimiter' => ',',
'no_headers' => 0,
),
),
'processor' => array(
'plugin_key' => 'FeedsNodeProcessor',
'config' => array(
'content_type' => 'reservations_reservation',
'expire' => '-1',
'author' => '0',
'mappings' => array(
0 => array(
'source' => 'reservation_id',
'target' => 'guid',
'unique' => 1,
),
1 => array(
'source' => 'reservation_id',
'target' => 'field_reservation_id',
'unique' => FALSE,
),
2 => array(
'source' => 'producer_id',
'target' => 'uid',
'unique' => FALSE,
),
3 => array(
'source' => 'project_id',
'target' => 'field_project_id',
'unique' => FALSE,
),
4 => array(
'source' => 'reserve_start_time',
'target' => 'field_reservations_date:start',
'unique' => FALSE,
),
5 => array(
'source' => 'reserve_end_time',
'target' => 'field_reservations_date:end',
'unique' => FALSE,
),
6 => array(
'source' => 'inventory_name',
'target' => 'field_reservations_inventory',
'unique' => FALSE,
),
),
'update_existing' => '0',
'input_format' => 'plain_text',
),
),
'content_type' => '',
'update' => 0,
'import_period' => '-1',
'expire_period' => 3600,
'import_on_create' => 1,
'process_in_background' => 1,
);
$export['mnn_reservations_import'] = $feeds_importer;
return $export;
}