punktde/nodereplicator
Composer 安装命令:
composer require punktde/nodereplicator
包简介
Replicate Neos node structure and content to other content dimensions
README 文档
README
This package provides an additional option for the NodeType configuration to automatically update this node in other dimensions.
The problem, this package solves
Scenario: On a multi language page, without configured fallbacks, you want to show addresses. The addresses are content nodes. An address entry should reference a country and a category. Country and categories should be content nodes too. While the title of a category and country needs to be translated for every language, the address itself stays the same for every language.
The problem: As soon, as you translate the page which contains the content nodes from language A to language B, you are no longer able to add nodes in both languages which have the same identifier. Without fallback you would need to add an address on every language separately with the references to the corresponding nodes.
The solution: This package adds a configuration option to the node type configuration called replication. Which allows you to specify if a node should be automatically replicated to all dimensions where the parent node already exists and also if the content in the alternative dimensions should be updated on change.
Configuration
Options:
'Vendor.Package:Address': superTypes: 'Neos.Neos:Content': true ... options: replication: structure: // Replicate the node itself into the other dimension if the parent exists and the node is missing, default: false create: true // Create the node as hidden, default: false createHidden: true // Also delete the node in other dimensions, default: false remove: true // Defaults for all properties of this nodeType properties: // defaults false update: true // default false, takes precedence of update updateEmptyOnly: true properties: myProperty: options: replication: // default inherited from node level config update: false // default inherited from node level config updateEmptyOnly: false
Example Configuration:
'Vendor.Package:Address': superTypes: 'Neos.Neos:Content': true ... options: replication: structure: create: true properties: update: true 'Vendor.Package:AddressCategory': superTypes: 'Neos.Neos:Content': true ... options: replication: structure: create: true 'Vendor.Package:AnotherAddressCategory': superTypes: 'Neos.Neos:Content': true ... options: replication: structure: create: true properties: updateEmptyOnly: true 'Vendor.Package:TranslateableCategory': superTypes: 'Neos.Neos:Content': true ... options: replication: structure: createHidden: true properties: updateEmptyOnly: true # Disable a single property 'Vendor.Package:YetAnotherAddressCategory': superTypes: 'Neos.Neos:Content': true ... options: replication: structure: create: true properties: update: true properties: metaDescription: options: replication: update: false
punktde/nodereplicator 适用场景与选型建议
punktde/nodereplicator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 7.32k 次下载、GitHub Stars 达 8, 最近一次更新时间为 2017 年 04 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 punktde/nodereplicator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 punktde/nodereplicator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 7.32k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-04-24