youwe / pimcore-fixtures
Load yml fixtures in pimcore
Installs: 9 813
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 11
Forks: 6
Open Issues: 1
Type:pimcore-bundle
Requires
- fzaninotto/faker: 1.6.*
- nelmio/alice: 2.2.*
- pimcore/pimcore: ^5.6.0
- dev-master
- 5.6.1
- 5.6
- 5.4
- 5.3
- 5.2
- 5.1
- 5.0
- 0.0.39
- 0.0.38
- 0.0.37
- 0.0.36
- 0.0.35
- 0.0.34
- 0.0.33
- 0.0.32
- 0.0.31
- 0.0.30
- 0.0.29
- 0.0.28
- 0.0.27
- 0.0.26
- 0.0.25
- 0.0.24
- 0.0.23
- 0.0.22
- 0.0.21
- 0.0.20
- 0.0.18
- 0.0.17
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.12
- 0.0.11
- 0.0.10
- 0.0.9
- 0.0.7
- 0.0.6
- dev-bugfix/rename-getchilds-togetchilderen
- dev-bugfix/rename
- dev-p.bettini-pimcore5-constants-usage
- dev-pimcore4
- dev-wip-href-fixtures
This package is auto-updated.
Last update: 2024-11-28 05:17:56 UTC
README
Based on Alice
How to install
composer require youwe/pimcore-fixtures
This plugin is only for DEV, do NOT install on a production server
How to load fixtures
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:
Console
php bin/console fixture:load --with-cache
Load individual files with --files comma separated files without yml extension:
Console
php bin/console fixture:load --files filename1,filename2
Backend
Go to Extensions \ PimcoreFixtures \ plugin settings \ Load fixtures
Fixtures generator (still beta)
Backend
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
Console
php bin/console fixtures:generate
Delete object/assets/documents
php bin/console fixtures:delete-path -t object -p /products
Useful links
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