nambu-ch/pimcore-relation-select-fields

Pimcore 6.x 数据对象和文档的关联字段

安装次数: 16,829

依赖项: 0

建议者: 0

安全: 0

星标: 5

关注者: 3

分支: 3

公开问题: 1

语言:JavaScript

类型:pimcore-bundle

v2.1.1 2022-08-21 17:16 UTC

This package is auto-updated.

Last update: 2024-09-21 21:42:15 UTC


README

文档和数据对象中关系的下拉菜单

Image description

在文档中的使用

显示选择框而不是经典拖放字段来配置文档内的关系。

单个对象的关系字段。

echo $view->relation_select("my-name", [
    "objectFolder" => 33,
    "recursive" => true,
    "classes" => ["BlogCategory"],
    "types" => ["object", "asset"],
    "displayFieldName" => "Name",
]);

多个对象的关系字段。

echo $view->relations_select("my-name", [
    "objectFolder" => 34,
    "recursive" => true,
    "classes" => ["BlogCategory"],
    "types" => ["object", "asset"],
]);

所有关系的基选项。

types: array with allowed types of object, asset, document

数据对象关系的可能选项。

objectFolder: ID or path of a folder
classes: Filter for DataObject Types
displayFieldName: FieldName of the DataObject (e.g. Name)
recursive: Load DataObjects recursive

资产关系的可能选项。

assetFolder: ID or path of a folder
assetTypes: Filter for types (e.g. folder, image, ...)

文档关系的可能选项。

documentFolder: ID or path of a folder
documentTypes: Filter for types (e.g. page, email, ...)

在数据对象中的使用

在关系菜单中选择一个新的数据字段并配置它们。