Generator objects from a template for Pimcore. This with use of faker.
Based on Alice
composer require youwe/pimcore-fixtures
This plugin is only for DEV, do NOT install on a production server
You must enable the bundle as followed php bin/console pimcore:bundle:enable FixtureBundle
. To check if the bundle is installed correctly php bin/console pimcore:bundle:list
.
Place your fixtures in /var/bundles/FixtureBundle/fixtures
named "001_object_name.yml", "002_object_name.yml" etc.
Example fixture for creating a folder
# 001_folders.yml
# Object folders
Pimcore\Model\Object\Folder:
products_folder:
key: products
path: /
parentId: 1
Load them with:
php bin/console fixture:load --with-cache
Load individual files with --files comma separated files without yml extension:
php bin/console fixture:load --files filename1,filename2
Go to Extensions \ PimcoreFixtures \ plugin settings \ Load fixtures
Go to Extensions \ PimcoreFixtures \ plugin settings
php bin/console fixtures:generate
php bin/console fixtures:delete-path -t object -p /products
Todo:
Support for following fields one fixtures:generate
security checks / user restrictions
better error handling in ext-js interface
live progress when loading fixtures