mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 18:34:32 +02:00
Allow to import category, footprint and manufacturer by giving a string in the CSV file
This commit is contained in:
parent
85ae862381
commit
61e2dde400
12 changed files with 173 additions and 35 deletions
|
@ -160,6 +160,8 @@ class EntityImporter
|
|||
[
|
||||
'groups' => $groups,
|
||||
'csv_delimiter' => $options['csv_delimiter'],
|
||||
'create_unknown_datastructures' => $options['create_unknown_datastructures'],
|
||||
'path_delimiter' => $options['path_delimiter'],
|
||||
]);
|
||||
|
||||
//Ensure we have an array of entity elements.
|
||||
|
@ -215,7 +217,9 @@ class EntityImporter
|
|||
'preserve_children' => true,
|
||||
'parent' => null, //The parent element to which the imported elements should be added
|
||||
'abort_on_validation_error' => true,
|
||||
'part_category' => null
|
||||
'part_category' => null,
|
||||
'create_unknown_datastructures' => true, //If true, unknown datastructures (categories, footprints, etc.) will be created on the fly
|
||||
'path_delimiter' => '->', //The delimiter used to separate the path elements in the name of a structural element
|
||||
]);
|
||||
|
||||
$resolver->setAllowedValues('format', ['csv', 'json', 'xml', 'yaml']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue