studioemma/bundle-installation-bundle

此包添加了辅助函数,以允许轻松安装 Pimcore 包。

2.0.0 2021-10-18 12:18 UTC

This package is auto-updated.

Last update: 2024-09-04 13:48:30 UTC


README

此包添加了辅助方法,以允许轻松安装 Pimcore 包。

包含的辅助方法

  • 类定义安装
  • 字段集合安装
  • 对象块安装
  • 创建(递归)数据对象文件夹和网站设置
  • 创建(递归)资产文件夹和网站设置
  • 创建(递归)文档文件夹和网站设置
  • 创建网站设置

安装

稳定版

composer require studioemma/bundle-installation-bundle

不稳定版

composer require studioemma/bundle-installation-bundle:dev-master

用法

将特性添加到包的 Installer 类中

use BundleInstallationTrait;

使用辅助方法(例如)

$this->installClassDefinition('Blog');
$this->installFieldCollection('BlogComment');
$this->installObjectBrick('BlogPostDetails');

$this->createObjectFolderAndWebsiteSetting('/blog','object_folder_blogs');
$this->createDocumentFolderAndWebsiteSetting('/blog','document_folder_posts');
$this->createAssetFolderAndWebsiteSetting('/blog', 'asset_folder_blog');

要能够安装类定义、字段集合和对象块,需要将项目的导出添加到您的包 "Resources/data" 文件夹中。它需要与 install* 方法中提供相同的名称。