Skip to content

Conversation

jamesbolitho
Copy link

Allow ColumnMap, MappableFields, Transforms, DuplicateChecks to be set on GridFieldImporter call in gridfield config e.g. $config->addComponents($importer = new GridFieldImporter('before'));

$importer->setColumnMap(array( 'listingid' => 'ID', 'title' => 'Title', 'price' => 'Amount' ));

$importer->setMappableFields(array( 'ID' => 'listingid', 'Title' => 'title', 'Amount' => 'price' ));

$importer->setTransforms(array( 'ID' => array( 'required' => true ), 'Title' => array( 'required' => true ), 'Amount' => array( 'required' => true ) ));

$importer->setDuplicateChecks(array( "ID" ));

Allow set Column Map, Mappable Fields, Transforms, Duplicates on an instance bases when calling GridFieldImporter through model admin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant