1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Examples and test folder for migration into date fields.
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
/**
|
9 |
|
|
* Implements hook_field_default_fields().
|
10 |
|
|
*/
|
11 |
|
|
function date_migrate_example_field_default_fields() {
|
12 |
|
|
$fields = array();
|
13 |
|
|
|
14 |
|
|
// Exported field: 'node-date_migrate_example-body'
|
15 |
|
|
$fields['node-date_migrate_example-body'] = array(
|
16 |
|
|
'field_config' => array(
|
17 |
|
|
'active' => '1',
|
18 |
|
|
'cardinality' => '1',
|
19 |
|
|
'deleted' => '0',
|
20 |
|
|
'entity_types' => array(
|
21 |
|
|
'0' => 'node',
|
22 |
|
|
),
|
23 |
|
|
'field_name' => 'body',
|
24 |
|
|
'foreign keys' => array(
|
25 |
|
|
'format' => array(
|
26 |
|
|
'columns' => array(
|
27 |
|
|
'format' => 'format',
|
28 |
|
|
),
|
29 |
|
|
'table' => 'filter_format',
|
30 |
|
|
),
|
31 |
|
|
),
|
32 |
|
|
'indexes' => array(
|
33 |
|
|
'format' => array(
|
34 |
|
|
'0' => 'format',
|
35 |
|
|
),
|
36 |
|
|
),
|
37 |
|
|
'module' => 'text',
|
38 |
|
|
'settings' => array(),
|
39 |
|
|
'translatable' => '1',
|
40 |
|
|
'type' => 'text_with_summary',
|
41 |
|
|
),
|
42 |
|
|
'field_instance' => array(
|
43 |
|
|
'bundle' => 'date_migrate_example',
|
44 |
|
|
'default_value' => NULL,
|
45 |
|
|
'deleted' => '0',
|
46 |
|
|
'description' => '',
|
47 |
|
|
'display' => array(
|
48 |
|
|
'default' => array(
|
49 |
|
|
'label' => 'hidden',
|
50 |
|
|
'module' => 'text',
|
51 |
|
|
'settings' => array(),
|
52 |
|
|
'type' => 'text_default',
|
53 |
|
|
'weight' => '0',
|
54 |
|
|
),
|
55 |
|
|
'teaser' => array(
|
56 |
|
|
'label' => 'hidden',
|
57 |
|
|
'module' => 'text',
|
58 |
|
|
'settings' => array(
|
59 |
|
|
'trim_length' => 600,
|
60 |
|
|
),
|
61 |
|
|
'type' => 'text_summary_or_trimmed',
|
62 |
|
|
'weight' => 0,
|
63 |
|
|
),
|
64 |
|
|
),
|
65 |
|
|
'entity_type' => 'node',
|
66 |
|
|
'field_name' => 'body',
|
67 |
|
|
'label' => 'Body',
|
68 |
|
|
'required' => FALSE,
|
69 |
|
|
'settings' => array(
|
70 |
|
|
'display_summary' => TRUE,
|
71 |
|
|
'text_processing' => 1,
|
72 |
|
|
'user_register_form' => FALSE,
|
73 |
|
|
),
|
74 |
|
|
'widget' => array(
|
75 |
|
|
'module' => 'text',
|
76 |
|
|
'settings' => array(
|
77 |
|
|
'rows' => 20,
|
78 |
|
|
'summary_rows' => 5,
|
79 |
|
|
),
|
80 |
|
|
'type' => 'text_textarea_with_summary',
|
81 |
|
|
'weight' => '1',
|
82 |
|
|
),
|
83 |
|
|
),
|
84 |
|
|
);
|
85 |
|
|
|
86 |
|
|
// Exported field: 'node-date_migrate_example-field_date'
|
87 |
|
|
$fields['node-date_migrate_example-field_date'] = array(
|
88 |
|
|
'field_config' => array(
|
89 |
|
|
'active' => '1',
|
90 |
|
|
'cardinality' => '-1',
|
91 |
|
|
'deleted' => '0',
|
92 |
|
|
'entity_types' => array(),
|
93 |
|
|
'field_name' => 'field_date',
|
94 |
|
|
'foreign keys' => array(),
|
95 |
|
|
'indexes' => array(),
|
96 |
|
|
'module' => 'date',
|
97 |
|
|
'settings' => array(
|
98 |
|
|
'granularity' => array(
|
99 |
|
|
'day' => 'day',
|
100 |
|
|
'hour' => 'hour',
|
101 |
|
|
'minute' => 'minute',
|
102 |
|
|
'month' => 'month',
|
103 |
|
|
'year' => 'year',
|
104 |
|
|
),
|
105 |
|
|
'repeat' => 0,
|
106 |
|
|
'timezone_db' => 'UTC',
|
107 |
|
|
'todate' => '',
|
108 |
|
|
'tz_handling' => 'site',
|
109 |
|
|
),
|
110 |
|
|
'translatable' => '1',
|
111 |
|
|
'type' => 'date',
|
112 |
|
|
),
|
113 |
|
|
'field_instance' => array(
|
114 |
|
|
'bundle' => 'date_migrate_example',
|
115 |
|
|
'deleted' => '0',
|
116 |
|
|
'description' => '',
|
117 |
|
|
'display' => array(
|
118 |
|
|
'default' => array(
|
119 |
|
|
'label' => 'above',
|
120 |
|
|
'module' => 'date',
|
121 |
|
|
'settings' => array(
|
122 |
|
|
'format_type' => 'medium',
|
123 |
|
|
'fromto' => 'both',
|
124 |
|
|
'multiple_from' => '',
|
125 |
|
|
'multiple_number' => '',
|
126 |
|
|
'multiple_to' => '',
|
127 |
|
|
'show_repeat_rule' => 'show',
|
128 |
|
|
),
|
129 |
|
|
'type' => 'date_default',
|
130 |
|
|
'weight' => '1',
|
131 |
|
|
),
|
132 |
|
|
'teaser' => array(
|
133 |
|
|
'label' => 'above',
|
134 |
|
|
'settings' => array(),
|
135 |
|
|
'type' => 'hidden',
|
136 |
|
|
'weight' => 0,
|
137 |
|
|
),
|
138 |
|
|
),
|
139 |
|
|
'entity_type' => 'node',
|
140 |
|
|
'field_name' => 'field_date',
|
141 |
|
|
'label' => 'Date',
|
142 |
|
|
'required' => 0,
|
143 |
|
|
'settings' => array(
|
144 |
|
|
'default_format' => 'medium',
|
145 |
|
|
'default_value' => 'now',
|
146 |
|
|
'default_value2' => 'blank',
|
147 |
|
|
'default_value_code' => '',
|
148 |
|
|
'default_value_code2' => '',
|
149 |
|
|
'user_register_form' => FALSE,
|
150 |
|
|
),
|
151 |
|
|
'widget' => array(
|
152 |
|
|
'active' => 1,
|
153 |
|
|
'module' => 'date',
|
154 |
|
|
'settings' => array(
|
155 |
|
|
'increment' => 1,
|
156 |
|
|
'input_format' => 'm/d/Y - H:i:s',
|
157 |
|
|
'input_format_custom' => '',
|
158 |
|
|
'label_position' => 'above',
|
159 |
|
|
'repeat_collapsed' => 0,
|
160 |
|
|
'text_parts' => array(),
|
161 |
|
|
'year_range' => '-3:+3',
|
162 |
|
|
),
|
163 |
|
|
'type' => 'date_text',
|
164 |
|
|
'weight' => '2',
|
165 |
|
|
),
|
166 |
|
|
),
|
167 |
|
|
);
|
168 |
|
|
|
169 |
|
|
// Exported field: 'node-date_migrate_example-field_date_range'
|
170 |
|
|
$fields['node-date_migrate_example-field_date_range'] = array(
|
171 |
|
|
'field_config' => array(
|
172 |
|
|
'active' => '1',
|
173 |
|
|
'cardinality' => '-1',
|
174 |
|
|
'deleted' => '0',
|
175 |
|
|
'entity_types' => array(),
|
176 |
|
|
'field_name' => 'field_date_range',
|
177 |
|
|
'foreign keys' => array(),
|
178 |
|
|
'indexes' => array(),
|
179 |
|
|
'module' => 'date',
|
180 |
|
|
'settings' => array(
|
181 |
|
|
'granularity' => array(
|
182 |
|
|
'day' => 'day',
|
183 |
|
|
'hour' => 'hour',
|
184 |
|
|
'minute' => 'minute',
|
185 |
|
|
'month' => 'month',
|
186 |
|
|
'year' => 'year',
|
187 |
|
|
),
|
188 |
|
|
'repeat' => 0,
|
189 |
|
|
'timezone_db' => 'UTC',
|
190 |
|
|
'todate' => 'required',
|
191 |
|
|
'tz_handling' => 'site',
|
192 |
|
|
),
|
193 |
|
|
'translatable' => '1',
|
194 |
|
|
'type' => 'date',
|
195 |
|
|
),
|
196 |
|
|
'field_instance' => array(
|
197 |
|
|
'bundle' => 'date_migrate_example',
|
198 |
|
|
'deleted' => '0',
|
199 |
|
|
'description' => '',
|
200 |
|
|
'display' => array(
|
201 |
|
|
'default' => array(
|
202 |
|
|
'label' => 'above',
|
203 |
|
|
'module' => 'date',
|
204 |
|
|
'settings' => array(
|
205 |
|
|
'format_type' => 'medium',
|
206 |
|
|
'fromto' => 'both',
|
207 |
|
|
'multiple_from' => '',
|
208 |
|
|
'multiple_number' => '',
|
209 |
|
|
'multiple_to' => '',
|
210 |
|
|
'show_repeat_rule' => 'show',
|
211 |
|
|
),
|
212 |
|
|
'type' => 'date_default',
|
213 |
|
|
'weight' => '2',
|
214 |
|
|
),
|
215 |
|
|
'teaser' => array(
|
216 |
|
|
'label' => 'above',
|
217 |
|
|
'settings' => array(),
|
218 |
|
|
'type' => 'hidden',
|
219 |
|
|
'weight' => 0,
|
220 |
|
|
),
|
221 |
|
|
),
|
222 |
|
|
'entity_type' => 'node',
|
223 |
|
|
'field_name' => 'field_date_range',
|
224 |
|
|
'label' => 'Date range',
|
225 |
|
|
'required' => 0,
|
226 |
|
|
'settings' => array(
|
227 |
|
|
'default_format' => 'medium',
|
228 |
|
|
'default_value' => 'now',
|
229 |
|
|
'default_value2' => 'strtotime',
|
230 |
|
|
'default_value_code' => '',
|
231 |
|
|
'default_value_code2' => '+7 days',
|
232 |
|
|
'user_register_form' => FALSE,
|
233 |
|
|
),
|
234 |
|
|
'widget' => array(
|
235 |
|
|
'active' => 1,
|
236 |
|
|
'module' => 'date',
|
237 |
|
|
'settings' => array(
|
238 |
|
|
'increment' => 1,
|
239 |
|
|
'input_format' => 'm/d/Y - H:i:s',
|
240 |
|
|
'input_format_custom' => '',
|
241 |
|
|
'label_position' => 'above',
|
242 |
|
|
'repeat_collapsed' => 0,
|
243 |
|
|
'text_parts' => array(),
|
244 |
|
|
'year_range' => '-3:+3',
|
245 |
|
|
),
|
246 |
|
|
'type' => 'date_text',
|
247 |
|
|
'weight' => '3',
|
248 |
|
|
),
|
249 |
|
|
),
|
250 |
|
|
);
|
251 |
|
|
|
252 |
|
|
// Exported field: 'node-date_migrate_example-field_date_repeat'
|
253 |
|
|
$fields['node-date_migrate_example-field_date_repeat'] = array(
|
254 |
|
|
'field_config' => array(
|
255 |
|
|
'active' => '1',
|
256 |
|
|
'cardinality' => '-1',
|
257 |
|
|
'deleted' => '0',
|
258 |
|
|
'entity_types' => array(),
|
259 |
|
|
'field_name' => 'field_date_repeat',
|
260 |
|
|
'foreign keys' => array(),
|
261 |
|
|
'indexes' => array(),
|
262 |
|
|
'module' => 'date',
|
263 |
|
|
'settings' => array(
|
264 |
|
|
'granularity' => array(
|
265 |
|
|
'day' => 'day',
|
266 |
|
|
'hour' => 'hour',
|
267 |
|
|
'minute' => 'minute',
|
268 |
|
|
'month' => 'month',
|
269 |
|
|
'year' => 'year',
|
270 |
|
|
),
|
271 |
|
|
'repeat' => 1,
|
272 |
|
|
'timezone_db' => 'UTC',
|
273 |
|
|
'todate' => '',
|
274 |
|
|
'tz_handling' => 'site',
|
275 |
|
|
),
|
276 |
|
|
'translatable' => '1',
|
277 |
|
|
'type' => 'date',
|
278 |
|
|
),
|
279 |
|
|
'field_instance' => array(
|
280 |
|
|
'bundle' => 'date_migrate_example',
|
281 |
|
|
'deleted' => '0',
|
282 |
|
|
'description' => '',
|
283 |
|
|
'display' => array(
|
284 |
|
|
'default' => array(
|
285 |
|
|
'label' => 'above',
|
286 |
|
|
'module' => 'date',
|
287 |
|
|
'settings' => array(
|
288 |
|
|
'format_type' => 'medium',
|
289 |
|
|
'fromto' => 'both',
|
290 |
|
|
'multiple_from' => '',
|
291 |
|
|
'multiple_number' => '',
|
292 |
|
|
'multiple_to' => '',
|
293 |
|
|
'show_repeat_rule' => 'show',
|
294 |
|
|
),
|
295 |
|
|
'type' => 'date_default',
|
296 |
|
|
'weight' => '7',
|
297 |
|
|
),
|
298 |
|
|
'teaser' => array(
|
299 |
|
|
'label' => 'above',
|
300 |
|
|
'settings' => array(),
|
301 |
|
|
'type' => 'hidden',
|
302 |
|
|
'weight' => 0,
|
303 |
|
|
),
|
304 |
|
|
),
|
305 |
|
|
'entity_type' => 'node',
|
306 |
|
|
'field_name' => 'field_date_repeat',
|
307 |
|
|
'label' => 'Date with repeat',
|
308 |
|
|
'required' => 0,
|
309 |
|
|
'settings' => array(
|
310 |
|
|
'default_format' => 'medium',
|
311 |
|
|
'default_value' => 'now',
|
312 |
|
|
'default_value2' => 'blank',
|
313 |
|
|
'default_value_code' => '',
|
314 |
|
|
'default_value_code2' => '',
|
315 |
|
|
'repeat_collapsed' => '0',
|
316 |
|
|
'user_register_form' => FALSE,
|
317 |
|
|
),
|
318 |
|
|
'widget' => array(
|
319 |
|
|
'active' => 1,
|
320 |
|
|
'module' => 'date',
|
321 |
|
|
'settings' => array(
|
322 |
|
|
'increment' => 1,
|
323 |
|
|
'input_format' => 'm/d/Y - H:i:s',
|
324 |
|
|
'input_format_custom' => '',
|
325 |
|
|
'label_position' => 'above',
|
326 |
|
|
'repeat_collapsed' => 0,
|
327 |
|
|
'text_parts' => array(),
|
328 |
|
|
'year_range' => '-3:+3',
|
329 |
|
|
),
|
330 |
|
|
'type' => 'date_text_repeat',
|
331 |
|
|
'weight' => '8',
|
332 |
|
|
),
|
333 |
|
|
),
|
334 |
|
|
);
|
335 |
|
|
|
336 |
|
|
// Exported field: 'node-date_migrate_example-field_datestamp'
|
337 |
|
|
$fields['node-date_migrate_example-field_datestamp'] = array(
|
338 |
|
|
'field_config' => array(
|
339 |
|
|
'active' => '1',
|
340 |
|
|
'cardinality' => '1',
|
341 |
|
|
'deleted' => '0',
|
342 |
|
|
'entity_types' => array(),
|
343 |
|
|
'field_name' => 'field_datestamp',
|
344 |
|
|
'foreign keys' => array(),
|
345 |
|
|
'indexes' => array(),
|
346 |
|
|
'module' => 'date',
|
347 |
|
|
'settings' => array(
|
348 |
|
|
'granularity' => array(
|
349 |
|
|
'day' => 'day',
|
350 |
|
|
'hour' => 'hour',
|
351 |
|
|
'minute' => 'minute',
|
352 |
|
|
'month' => 'month',
|
353 |
|
|
'year' => 'year',
|
354 |
|
|
),
|
355 |
|
|
'repeat' => 0,
|
356 |
|
|
'timezone_db' => 'UTC',
|
357 |
|
|
'todate' => '',
|
358 |
|
|
'tz_handling' => 'site',
|
359 |
|
|
),
|
360 |
|
|
'translatable' => '1',
|
361 |
|
|
'type' => 'datestamp',
|
362 |
|
|
),
|
363 |
|
|
'field_instance' => array(
|
364 |
|
|
'bundle' => 'date_migrate_example',
|
365 |
|
|
'deleted' => '0',
|
366 |
|
|
'description' => '',
|
367 |
|
|
'display' => array(
|
368 |
|
|
'default' => array(
|
369 |
|
|
'label' => 'above',
|
370 |
|
|
'module' => 'date',
|
371 |
|
|
'settings' => array(
|
372 |
|
|
'format_type' => 'medium',
|
373 |
|
|
'fromto' => 'both',
|
374 |
|
|
'multiple_from' => '',
|
375 |
|
|
'multiple_number' => '',
|
376 |
|
|
'multiple_to' => '',
|
377 |
|
|
'show_repeat_rule' => 'show',
|
378 |
|
|
),
|
379 |
|
|
'type' => 'date_default',
|
380 |
|
|
'weight' => '3',
|
381 |
|
|
),
|
382 |
|
|
'teaser' => array(
|
383 |
|
|
'label' => 'above',
|
384 |
|
|
'settings' => array(),
|
385 |
|
|
'type' => 'hidden',
|
386 |
|
|
'weight' => 0,
|
387 |
|
|
),
|
388 |
|
|
),
|
389 |
|
|
'entity_type' => 'node',
|
390 |
|
|
'field_name' => 'field_datestamp',
|
391 |
|
|
'label' => 'Datestamp',
|
392 |
|
|
'required' => 0,
|
393 |
|
|
'settings' => array(
|
394 |
|
|
'default_format' => 'medium',
|
395 |
|
|
'default_value' => 'now',
|
396 |
|
|
'default_value2' => 'blank',
|
397 |
|
|
'default_value_code' => '',
|
398 |
|
|
'default_value_code2' => '',
|
399 |
|
|
'user_register_form' => FALSE,
|
400 |
|
|
),
|
401 |
|
|
'widget' => array(
|
402 |
|
|
'active' => 1,
|
403 |
|
|
'module' => 'date',
|
404 |
|
|
'settings' => array(
|
405 |
|
|
'increment' => 1,
|
406 |
|
|
'input_format' => 'm/d/Y - H:i:s',
|
407 |
|
|
'input_format_custom' => '',
|
408 |
|
|
'label_position' => 'above',
|
409 |
|
|
'repeat_collapsed' => 0,
|
410 |
|
|
'text_parts' => array(),
|
411 |
|
|
'year_range' => '-3:+3',
|
412 |
|
|
),
|
413 |
|
|
'type' => 'date_text',
|
414 |
|
|
'weight' => '4',
|
415 |
|
|
),
|
416 |
|
|
),
|
417 |
|
|
);
|
418 |
|
|
|
419 |
|
|
// Exported field: 'node-migrate_example_date-field_datestamp_range'
|
420 |
|
|
$fields['node-date_migrate_example-field_datestamp_range'] = array(
|
421 |
|
|
'field_config' => array(
|
422 |
|
|
'active' => '1',
|
423 |
|
|
'cardinality' => '1',
|
424 |
|
|
'deleted' => '0',
|
425 |
|
|
'entity_types' => array(),
|
426 |
|
|
'field_name' => 'field_datestamp_range',
|
427 |
|
|
'foreign keys' => array(),
|
428 |
|
|
'indexes' => array(),
|
429 |
|
|
'module' => 'date',
|
430 |
|
|
'settings' => array(
|
431 |
|
|
'granularity' => array(
|
432 |
|
|
'day' => 'day',
|
433 |
|
|
'hour' => 'hour',
|
434 |
|
|
'minute' => 'minute',
|
435 |
|
|
'month' => 'month',
|
436 |
|
|
'year' => 'year',
|
437 |
|
|
),
|
438 |
|
|
'repeat' => 0,
|
439 |
|
|
'timezone_db' => 'UTC',
|
440 |
|
|
'todate' => 'optional',
|
441 |
|
|
'tz_handling' => 'site',
|
442 |
|
|
),
|
443 |
|
|
'translatable' => '1',
|
444 |
|
|
'type' => 'datestamp',
|
445 |
|
|
),
|
446 |
|
|
'field_instance' => array(
|
447 |
|
|
'bundle' => 'date_migrate_example',
|
448 |
|
|
'deleted' => '0',
|
449 |
|
|
'description' => '',
|
450 |
|
|
'display' => array(
|
451 |
|
|
'default' => array(
|
452 |
|
|
'label' => 'above',
|
453 |
|
|
'module' => 'date',
|
454 |
|
|
'settings' => array(
|
455 |
|
|
'format_type' => 'medium',
|
456 |
|
|
'fromto' => 'both',
|
457 |
|
|
'multiple_from' => '',
|
458 |
|
|
'multiple_number' => '',
|
459 |
|
|
'multiple_to' => '',
|
460 |
|
|
'show_repeat_rule' => 'show',
|
461 |
|
|
),
|
462 |
|
|
'type' => 'date_default',
|
463 |
|
|
'weight' => '4',
|
464 |
|
|
),
|
465 |
|
|
'teaser' => array(
|
466 |
|
|
'label' => 'above',
|
467 |
|
|
'settings' => array(),
|
468 |
|
|
'type' => 'hidden',
|
469 |
|
|
'weight' => 0,
|
470 |
|
|
),
|
471 |
|
|
),
|
472 |
|
|
'entity_type' => 'node',
|
473 |
|
|
'field_name' => 'field_datestamp_range',
|
474 |
|
|
'label' => 'Datestamp range',
|
475 |
|
|
'required' => 0,
|
476 |
|
|
'settings' => array(
|
477 |
|
|
'default_format' => 'medium',
|
478 |
|
|
'default_value' => 'now',
|
479 |
|
|
'default_value2' => 'strtotime',
|
480 |
|
|
'default_value_code' => '',
|
481 |
|
|
'default_value_code2' => '+3 months',
|
482 |
|
|
'user_register_form' => FALSE,
|
483 |
|
|
),
|
484 |
|
|
'widget' => array(
|
485 |
|
|
'active' => 1,
|
486 |
|
|
'module' => 'date',
|
487 |
|
|
'settings' => array(
|
488 |
|
|
'increment' => '1',
|
489 |
|
|
'input_format' => 'm/d/Y - H:i:s',
|
490 |
|
|
'input_format_custom' => '',
|
491 |
|
|
'label_position' => 'above',
|
492 |
|
|
'repeat_collapsed' => 0,
|
493 |
|
|
'text_parts' => array(),
|
494 |
|
|
'year_range' => '-3:+3',
|
495 |
|
|
),
|
496 |
|
|
'type' => 'date_select',
|
497 |
|
|
'weight' => '5',
|
498 |
|
|
),
|
499 |
|
|
),
|
500 |
|
|
);
|
501 |
|
|
|
502 |
|
|
// Exported field: 'node-date_migrate_example-field_datetime'
|
503 |
|
|
$fields['node-date_migrate_example-field_datetime'] = array(
|
504 |
|
|
'field_config' => array(
|
505 |
|
|
'active' => '1',
|
506 |
|
|
'cardinality' => '1',
|
507 |
|
|
'deleted' => '0',
|
508 |
|
|
'entity_types' => array(),
|
509 |
|
|
'field_name' => 'field_datetime',
|
510 |
|
|
'foreign keys' => array(),
|
511 |
|
|
'indexes' => array(),
|
512 |
|
|
'module' => 'date',
|
513 |
|
|
'settings' => array(
|
514 |
|
|
'granularity' => array(
|
515 |
|
|
'day' => 'day',
|
516 |
|
|
'hour' => 'hour',
|
517 |
|
|
'minute' => 'minute',
|
518 |
|
|
'month' => 'month',
|
519 |
|
|
'year' => 'year',
|
520 |
|
|
),
|
521 |
|
|
'repeat' => 0,
|
522 |
|
|
'timezone_db' => 'UTC',
|
523 |
|
|
'todate' => '',
|
524 |
|
|
'tz_handling' => 'site',
|
525 |
|
|
),
|
526 |
|
|
'translatable' => '1',
|
527 |
|
|
'type' => 'datetime',
|
528 |
|
|
),
|
529 |
|
|
'field_instance' => array(
|
530 |
|
|
'bundle' => 'date_migrate_example',
|
531 |
|
|
'deleted' => '0',
|
532 |
|
|
'description' => '',
|
533 |
|
|
'display' => array(
|
534 |
|
|
'default' => array(
|
535 |
|
|
'label' => 'above',
|
536 |
|
|
'module' => 'date',
|
537 |
|
|
'settings' => array(
|
538 |
|
|
'format_type' => 'medium',
|
539 |
|
|
'fromto' => 'both',
|
540 |
|
|
'multiple_from' => '',
|
541 |
|
|
'multiple_number' => '',
|
542 |
|
|
'multiple_to' => '',
|
543 |
|
|
'show_repeat_rule' => 'show',
|
544 |
|
|
),
|
545 |
|
|
'type' => 'date_default',
|
546 |
|
|
'weight' => '5',
|
547 |
|
|
),
|
548 |
|
|
'teaser' => array(
|
549 |
|
|
'label' => 'above',
|
550 |
|
|
'settings' => array(),
|
551 |
|
|
'type' => 'hidden',
|
552 |
|
|
'weight' => 0,
|
553 |
|
|
),
|
554 |
|
|
),
|
555 |
|
|
'entity_type' => 'node',
|
556 |
|
|
'field_name' => 'field_datetime',
|
557 |
|
|
'label' => 'Datetime',
|
558 |
|
|
'required' => 0,
|
559 |
|
|
'settings' => array(
|
560 |
|
|
'default_format' => 'medium',
|
561 |
|
|
'default_value' => 'now',
|
562 |
|
|
'default_value2' => 'blank',
|
563 |
|
|
'default_value_code' => '',
|
564 |
|
|
'default_value_code2' => '',
|
565 |
|
|
'user_register_form' => FALSE,
|
566 |
|
|
),
|
567 |
|
|
'widget' => array(
|
568 |
|
|
'active' => 1,
|
569 |
|
|
'module' => 'date',
|
570 |
|
|
'settings' => array(
|
571 |
|
|
'increment' => 1,
|
572 |
|
|
'input_format' => 'm/d/Y - H:i:s',
|
573 |
|
|
'input_format_custom' => '',
|
574 |
|
|
'label_position' => 'above',
|
575 |
|
|
'repeat_collapsed' => 0,
|
576 |
|
|
'text_parts' => array(),
|
577 |
|
|
'year_range' => '-3:+3',
|
578 |
|
|
),
|
579 |
|
|
'type' => 'date_text',
|
580 |
|
|
'weight' => '6',
|
581 |
|
|
),
|
582 |
|
|
),
|
583 |
|
|
);
|
584 |
|
|
|
585 |
|
|
// Exported field: 'node-date_migrate_example-field_datetime_range'
|
586 |
|
|
$fields['node-date_migrate_example-field_datetime_range'] = array(
|
587 |
|
|
'field_config' => array(
|
588 |
|
|
'active' => '1',
|
589 |
|
|
'cardinality' => '1',
|
590 |
|
|
'deleted' => '0',
|
591 |
|
|
'entity_types' => array(),
|
592 |
|
|
'field_name' => 'field_datetime_range',
|
593 |
|
|
'foreign keys' => array(),
|
594 |
|
|
'indexes' => array(),
|
595 |
|
|
'module' => 'date',
|
596 |
|
|
'settings' => array(
|
597 |
|
|
'granularity' => array(
|
598 |
|
|
'day' => 'day',
|
599 |
|
|
'hour' => 'hour',
|
600 |
|
|
'minute' => 'minute',
|
601 |
|
|
'month' => 'month',
|
602 |
|
|
'year' => 'year',
|
603 |
|
|
),
|
604 |
|
|
'repeat' => 0,
|
605 |
|
|
'timezone_db' => 'UTC',
|
606 |
|
|
'todate' => 'required',
|
607 |
|
|
'tz_handling' => 'site',
|
608 |
|
|
),
|
609 |
|
|
'translatable' => '1',
|
610 |
|
|
'type' => 'datetime',
|
611 |
|
|
),
|
612 |
|
|
'field_instance' => array(
|
613 |
|
|
'bundle' => 'date_migrate_example',
|
614 |
|
|
'deleted' => '0',
|
615 |
|
|
'description' => '',
|
616 |
|
|
'display' => array(
|
617 |
|
|
'default' => array(
|
618 |
|
|
'label' => 'above',
|
619 |
|
|
'module' => 'date',
|
620 |
|
|
'settings' => array(
|
621 |
|
|
'format_type' => 'medium',
|
622 |
|
|
'fromto' => 'both',
|
623 |
|
|
'multiple_from' => '',
|
624 |
|
|
'multiple_number' => '',
|
625 |
|
|
'multiple_to' => '',
|
626 |
|
|
'show_repeat_rule' => 'show',
|
627 |
|
|
),
|
628 |
|
|
'type' => 'date_default',
|
629 |
|
|
'weight' => '6',
|
630 |
|
|
),
|
631 |
|
|
'teaser' => array(
|
632 |
|
|
'label' => 'above',
|
633 |
|
|
'settings' => array(),
|
634 |
|
|
'type' => 'hidden',
|
635 |
|
|
'weight' => 0,
|
636 |
|
|
),
|
637 |
|
|
),
|
638 |
|
|
'entity_type' => 'node',
|
639 |
|
|
'field_name' => 'field_datetime_range',
|
640 |
|
|
'label' => 'Datetime range',
|
641 |
|
|
'required' => 0,
|
642 |
|
|
'settings' => array(
|
643 |
|
|
'default_format' => 'medium',
|
644 |
|
|
'default_value' => 'now',
|
645 |
|
|
'default_value2' => 'blank',
|
646 |
|
|
'default_value_code' => '',
|
647 |
|
|
'default_value_code2' => '+1 year',
|
648 |
|
|
'user_register_form' => FALSE,
|
649 |
|
|
),
|
650 |
|
|
'widget' => array(
|
651 |
|
|
'active' => 1,
|
652 |
|
|
'module' => 'date',
|
653 |
|
|
'settings' => array(
|
654 |
|
|
'increment' => 1,
|
655 |
|
|
'input_format' => 'm/d/Y - H:i:s',
|
656 |
|
|
'input_format_custom' => '',
|
657 |
|
|
'label_position' => 'above',
|
658 |
|
|
'repeat_collapsed' => 0,
|
659 |
|
|
'text_parts' => array(),
|
660 |
|
|
'year_range' => '-3:+3',
|
661 |
|
|
),
|
662 |
|
|
'type' => 'date_text',
|
663 |
|
|
'weight' => '7',
|
664 |
|
|
),
|
665 |
|
|
),
|
666 |
|
|
);
|
667 |
|
|
|
668 |
|
|
// Translatables
|
669 |
|
|
// Included for use with string extractors like potx.
|
670 |
|
|
t('Body');
|
671 |
|
|
t('Date');
|
672 |
|
|
t('Date range');
|
673 |
|
|
t('Date with repeat');
|
674 |
|
|
t('Datestamp');
|
675 |
|
|
t('Datestamp range');
|
676 |
|
|
t('Datetime');
|
677 |
|
|
t('Datetime range');
|
678 |
|
|
|
679 |
|
|
return $fields;
|
680 |
|
|
} |