mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Add importer columns for quantity measure and label fields.
This commit is contained in:
parent
2e3c959826
commit
02685fa3c2
|
@ -220,8 +220,14 @@ function farm_import_add_importer_fields($type, $bundle, $importer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add Quantity field, if it exists. This is a bit more complicated because
|
// Add Quantity field, if it exists. This is a bit more complicated because
|
||||||
// it is a field collection, so there are two targets.
|
// it is a field collection, so there are multiple targets.
|
||||||
if (!empty(field_info_instance($type, 'field_farm_quantity', $bundle))) {
|
if (!empty(field_info_instance($type, 'field_farm_quantity', $bundle))) {
|
||||||
|
$importer->config['processor']['config']['mappings'][] = array(
|
||||||
|
'source' => 'Quantity measure',
|
||||||
|
'target' => 'field_farm_quantity:field_farm_quantity_measure',
|
||||||
|
'unique' => FALSE,
|
||||||
|
'language' => 'und',
|
||||||
|
);
|
||||||
$importer->config['processor']['config']['mappings'][] = array(
|
$importer->config['processor']['config']['mappings'][] = array(
|
||||||
'source' => 'Quantity value',
|
'source' => 'Quantity value',
|
||||||
'target' => 'field_farm_quantity:field_farm_quantity_value',
|
'target' => 'field_farm_quantity:field_farm_quantity_value',
|
||||||
|
@ -234,6 +240,12 @@ function farm_import_add_importer_fields($type, $bundle, $importer) {
|
||||||
'term_search' => '0',
|
'term_search' => '0',
|
||||||
'autocreate' => 1,
|
'autocreate' => 1,
|
||||||
);
|
);
|
||||||
|
$importer->config['processor']['config']['mappings'][] = array(
|
||||||
|
'source' => 'Quantity label',
|
||||||
|
'target' => 'field_farm_quantity:field_farm_quantity_label',
|
||||||
|
'unique' => FALSE,
|
||||||
|
'language' => 'und',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue