-
Notifications
You must be signed in to change notification settings - Fork 0
/
mnn_project_import.feeds_importer_default.inc
116 lines (113 loc) · 3.06 KB
/
mnn_project_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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php
/**
* @file
* mnn_project_import.feeds_importer_default.inc
*/
/**
* Implements hook_feeds_importer_default().
*/
function mnn_project_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 = 'projects';
$feeds_importer->config = array(
'name' => 'Projects',
'description' => '',
'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' => 'cm_project',
'expire' => '-1',
'author' => '0',
'mappings' => array(
0 => array(
'source' => 'project_id',
'target' => 'nid',
'unique' => 1,
),
1 => array(
'source' => 'title',
'target' => 'title',
'unique' => 0,
),
2 => array(
'source' => 'created',
'target' => 'created',
'unique' => FALSE,
),
3 => array(
'source' => 'exec_producer_id',
'target' => 'uid',
'unique' => FALSE,
),
4 => array(
'source' => 'narrative',
'target' => 'field_description',
'unique' => FALSE,
),
5 => array(
'source' => 'public_contact_info',
'target' => 'field_public_contact',
'unique' => FALSE,
),
6 => array(
'source' => 'interval',
'target' => 'field_interval',
'unique' => FALSE,
),
7 => array(
'source' => 'department',
'target' => 'field_department',
'unique' => FALSE,
),
8 => array(
'source' => 'device',
'target' => 'field_device',
'unique' => FALSE,
),
9 => array(
'source' => 'runtime',
'target' => 'field_runtime',
'unique' => FALSE,
),
10 => array(
'source' => 'interval',
'target' => 'field_interval',
'unique' => FALSE,
),
11 => array(
'source' => 'language',
'target' => 'field_pbcore_languages',
'unique' => FALSE,
),
),
'update_existing' => '2',
'input_format' => 'plain_text',
),
),
'content_type' => '',
'update' => 0,
'import_period' => 1800,
'expire_period' => 3600,
'import_on_create' => TRUE,
'process_in_background' => FALSE,
);
$export['projects'] = $feeds_importer;
return $export;
}