diff --git a/LICENSE b/LICENSE index 3f3d4e9..8a4c992 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ -Copyright © 2019-present Sylius Sp. z o.o. All rights reserved. +Copyright © 2025-present Sylius Sp. z o.o. All rights reserved. -Sylius B2B Kit is the proprietary software of Sylius, licensed under the commercial license. Its use requires Sylius' consent. +Sylius GridImportExport Bundle is the proprietary software of Sylius, licensed under the commercial license. Its use requires Sylius' consent. In any case you may not copy, decompile, sell or otherwise distribute or use this software without Sylius' explicit consent granted in the License Agreement. If you have not concluded the agreement with Sylius, granting you the license to use Sylius Plus please remove this software from your devices. diff --git a/README.md b/README.md index ba77ac5..3aa487a 100644 --- a/README.md +++ b/README.md @@ -1 +1,89 @@ -# GridImportExportBundle +

+ + + + + Sylius Logo. + + +

+ +

Grid Import/Export Bundle

+ +The GridImportExportBundle allows for easy and decoupled data migration to and from various mediums.
+It works by relying on the Sylius [Resource](https://github.com/sylius/syliusresourcebundle) and [Grid](https://github.com/Sylius/syliusgridbundle) systems for resolving and providing data. + +## Export + +### Functionality + +The main and bulk grid actions get automatically injected into configured resources' grids. + +Supported formats: +- json +- csv + +#### Main export action + +It respects currently applied filters when exporting resources. + +![Screenshot showing order grid with main action focused](docs/images/screenshot_order_main_action.png) + +#### Bulk export action + +In cases when specifying filters is not enough, or you want just a subset of the resource, in comes the bulk action. + +![Screenshot showing order grid with bulk action focused](docs/images/screenshot_order_bulk_action.png) + +#### Processes + +Here you can manage currently running and already processed exports as well as download the exported data. + +![Screenshot showing processes index](docs/images/screenshot_process_index.png) + +## Installation + +#### Beware! + +This installation instruction assumes that you're using Symfony Flex. If you don't, take a look at the +[legacy installation instruction](docs/legacy_installation.md). However, we strongly encourage you to use +Symfony Flex, it's much quicker! + +1. Require plugin with composer: + + ```bash + composer require sylius/grid-import-export-bundle + ``` + + > Remember to allow community recipes with `composer config extra.symfony.allow-contrib true` or during plugin installation process + +2. Apply migrations to your database: + + ```bash + bin/console doctrine:migrations:migrate + ``` + +3. Configure export for resources: + + ```yaml + # config/packages/sylius_grid_import_export.yaml + sylius_grid_import_export: + export: + resources: + sylius.order: ~ + app.brand: + sections: + - 'Sylius\Bundle\AdminBundle\SectionResolver\AdminSection' + provider: 'sylius_import_export.provider.resource_data.dbal' + ``` + For a more detailed overview check the [configuration reference](docs/configuration_reference.md). + +## Exported files + +By default, when a resource gets exported, a file is saved on the server. The save directory is specified +with the `%sylius_grid_import_export.export_files_directory%` parameter, that can be overridden if needed. + +## Security issues + +If you think that you have found a security issue, please do not use the issue tracker and do not post it publicly. +Instead, all security issues must be sent to `security@sylius.com`. diff --git a/docs/configuration_reference.md b/docs/configuration_reference.md new file mode 100644 index 0000000..97e1dcf --- /dev/null +++ b/docs/configuration_reference.md @@ -0,0 +1,50 @@ +## Configuration reference + +### Export + +Minimal resource configuration: + +```yaml +sylius_grid_import_export: + export: + resources: + app.brand: ~ +``` + +Full resource configuration: + +```yaml +sylius_grid_import_export: + export: + resources: + app.brand: + provider: 'sylius_import_export.provider.resource_data.dbal' + sections: + - 'admin' + - 'Sylius\Bundle\ShopBundle\SectionResolver\ShopCustomerAccountSubSection' +``` + +Reference: + +```yaml +sylius_grid_import_export: + export: + # The provider used by default when none is configured on a specific resource; + # defaults to 'sylius_import_export.provider.resource_data.grid'. + default_provider: + # The section in which the actions are added to the grid. + # Can be either an FQCN of a class implementing the Sylius\Bundle\CoreBundle\SectionResolver\SectionInterface, + # or a value of the '_sylius.section' routing attribute; + # Defaults to 'admin' + default_section: + resources: + # The alias of a resource as configured within the ResourceBundle + # It can be retried by using the `console/bin sylius:debug:resource` console command. + : + # Resource specific overwrite of the default_provider + provider: + # Resource specific overwrite of the default section + sections: + - + - ... +``` diff --git a/docs/images/screenshot_order_bulk_action.png b/docs/images/screenshot_order_bulk_action.png new file mode 100644 index 0000000..91c9290 Binary files /dev/null and b/docs/images/screenshot_order_bulk_action.png differ diff --git a/docs/images/screenshot_order_main_action.png b/docs/images/screenshot_order_main_action.png new file mode 100644 index 0000000..87a7c49 Binary files /dev/null and b/docs/images/screenshot_order_main_action.png differ diff --git a/docs/images/screenshot_process_index.png b/docs/images/screenshot_process_index.png new file mode 100644 index 0000000..634d23b Binary files /dev/null and b/docs/images/screenshot_process_index.png differ