kaapiii/concrete5_doctrine_behavioral_extensions

该包为 concrete5 添加了 Doctrine2 行为扩展

2.0.0 2020-11-14 21:03 UTC

This package is auto-updated.

Last update: 2024-09-15 06:30:26 UTC


README

Latest Stable Version Total Downloads License

concrete5 v8 的 Doctrine2 行为扩展

该包为 concrete5 版本 >= 8.0.0 添加了 doctrine behavioral extensions

安装

require kaapiii/concrete5_doctrine_behavioral_extensions
  • 在 concrete5 中安装该包
  • 导航到 系统 & 设置 -> Doctrine Behavioral Extensions 以查看活动和可用扩展。

版本兼容性

支持的扩展

  • 可追溯
  • 可记录
  • 可生成缩略名
  • 可标记时间戳
  • 可翻译
  • 树形结构
  • 可排序
  • 可软删除(自包版本 2.0.0 起支持)

用法

更新映射信息和实体
更新您的包中的实体以添加所需的行为。以下是一个使用 yaml 映射文件和时间戳行为的示例。

---
Kaapiii\Example\MyEntity:
  type: entity
  table: myentity
  id:
    id:
      type: integer
      generator:
        strategy: AUTO
  fields:
    title:
      type: string
      length: 64
    created:
      type: date
      gedmo:
        timestampable:
          on: create
    updated:
      type: datetime
      gedmo:
        timestampable:
          on: update

更新您的包
增加您的 concrete5 包版本并更新包。concrete5 将处理所有实体的升级。

文档

有关如何在实体中使用行为扩展的更多信息,请参阅 Atlantic18/DoctrineExtensions 仓库