Based on Alice
composer require --dev youwe/pimcore-fixturesThis plugin is only for DEV, do NOT install on a production server
Make sure "PimcoreFixtures" is enabled in /website/var/config/extensions.php
Place your fixtures in /website/var/plugins/PimcoreFixtures/fixtures named "001_object_name.yml", "002_object_name.yml" etc.
Load them with:
php pimcore/cli/console.php fixture:load --with-cacheLoad individual files with --files comma separated files without yml extension:
php pimcore/cli/console.php fixture:load --files filename1,filename2Go to Extensions \ PimcoreFixtures \ plugin settings \ Load fixtures
Go to Extensions \ PimcoreFixtures \ plugin settings
- Object path: the root where to start generating fixtures
- Object name: Recommended would be the object class ex. product, will translate into at [PIMCORE_ROOT]/website/var/plugins/PimcoreFixtures/fixtures/000_product.yml
- Max level deep: Will stop at the specified level (default 1) and if greater then 1 then level will be appended to filename
- Click generate. The generated files should be at [PIMCORE_ROOT]/website/var/plugins/PimcoreFixtures/fixtures/*.yml
php pimcore/cli/console.php fixtures:generatephp pimcore/cli/console.php fixtures:delete-path -t object -p /products
Todo:
-
Support for following fields one fixtures:generate
- Object\ClassDefinition\Data\Classificationstore
- Object\ClassDefinition\Data\Fieldcollection
- Object\ClassDefinition\Data\ObjectsMetadata
- Object\ClassDefinition\Data\MultihrefMetadata
- Object\ClassDefinition\Data\Objectbricks
-
security checks / user restrictions
-
better error handling in ext-js interface
-
live progress when loading fixtures