zauberfisch/silverstripe-persistent-dataobject 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

zauberfisch/silverstripe-persistent-dataobject

Composer 安装命令:

composer require zauberfisch/silverstripe-persistent-dataobject

包简介

Persistent and optionally immutable & versioned DataObjects for SilverStripe

README 文档

README

Persistent and optionally immutable & versioned DataObjects for SilverStripe

The two major features of this module are:

  1. A DataObject subclass that can not be deleted
    Calling ->delete() will mark an object as deleted, but not actually delete it
    (Where necessary, objects can still be deleted by calling ->purge())
  2. A DataObjectExtension that adds versioning
    In contrast to the "silverstripe-versioned" module, versioning is achived by making DataObjects immutable and overloading ->write() to create a duplicate of the current record instead of saving the existing.
    This means the ID becomes the unique version number, while an additional VersionGroupID and VersionGroupLatest keep track of the relation of records. The benefit of this approach is being able to easily reference a version of an entry rather than always the latest version. Thus making it possible to have persistent storage of information that is easily integrable in other parts of SilverStripe (eg an invoice can safely reference a product price and does not need to create a snapshot).

TODOs / Planed features

  • Tests
  • Revisit decision to put VersionGroup_ID on DataObject rather than subclasses
  • Extend GridField integration
    • Hide/Show deleted records button
    • History view to access older version from within a DataObject
  • Implement non GridField form fields (eg Relation Dropdown that let's the user pick a entry and a version)
  • Implement Database Field/Relation that references VersionGroupID instead of ID?
  • Documentation
    • Explain the usecase in more detail
    • Examples
  • SilverStripe 4 Support

统计信息

  • 总下载量: 153
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-06-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固