youwe / pimcore-fixtures
在 pimcore 中加载 yml 固件
5.6.1
2019-11-12 11:04 UTC
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-08-28 04:46:51 UTC
README
基于 Alice
如何安装
composer require youwe/pimcore-fixtures
此插件仅适用于开发环境,请勿在生产服务器上安装
如何加载固件
您必须按照以下步骤启用扩展:php bin/console pimcore:bundle:enable FixtureBundle
。要检查扩展是否正确安装,请运行 php bin/console pimcore:bundle:list
。将您的固件放置在 /var/bundles/FixtureBundle/fixtures
目录中,命名为 "001_object_name.yml","002_object_name.yml" 等。
创建文件夹的示例固件
# 001_folders.yml # Object folders Pimcore\Model\Object\Folder: products_folder: key: products path: / parentId: 1
使用以下方法加载它们
控制台
php bin/console fixture:load --with-cache
使用 --files 参数加载单个文件,逗号分隔,无需 yml 扩展名
控制台
php bin/console fixture:load --files filename1,filename2
后端
转到扩展 \ PimcoreFixtures \ 插件设置 \ 加载固件
固件生成器(仍处于测试阶段)
后端
转到扩展 \ PimcoreFixtures \ 插件设置
- 对象路径:开始生成固件的根目录
- 对象名称:建议使用对象类名,例如 product,将转换为 [PIMCORE_ROOT]/website/var/plugins/PimcoreFixtures/fixtures/000_product.yml
- 最大深度:将在指定级别停止(默认为 1),如果大于 1,则将级别附加到文件名
- 点击生成。生成的文件应在 [PIMCORE_ROOT]/website/var/plugins/PimcoreFixtures/fixtures/*.yml 中
控制台
php bin/console fixtures:generate
删除对象/资产/文档
php bin/console fixtures:delete-path -t object -p /products
有用链接
待办事项
-
固件生成中支持以下字段:one fixtures:generate
- Object\ClassDefinition\Data\Classificationstore
- Object\ClassDefinition\Data\Fieldcollection
- Object\ClassDefinition\Data\ObjectsMetadata
- Object\ClassDefinition\Data\MultihrefMetadata
- Object\ClassDefinition\Data\Objectbricks
-
安全检查/用户限制
-
在 ext-js 接口中更好的错误处理
-
加载固件时的实时进度