bluehousegroup/silverstripe-data-object-version-viewer
最新稳定版本:0.1
Composer 安装命令:
composer require bluehousegroup/silverstripe-data-object-version-viewer
包简介
Allows viewing of version history for data objects inside of the SilverStripe CMS
README 文档
README
Install with Composer
composer require bluehousegroup/silverstripe-data-object-version-viewer
Usage
- Extend
silverstripe-versioneddataobjectsto add a 'History' button to a GridField or ModelAdmin - View, revert to, and publish a previous versions of a data object
Example code
The implementation is very similar to the versioneddataobjects module, on which this module depends.
Within your DataObject class
class Slice extends DataObject { private static $db = [ 'Content' => 'Text' ]; private static $has_one = [ 'Parent' => 'SiteTree' ]; private static $extensions = [ 'Heyday\VersionedDataObjects\VersionedDataObject' ]; }
To use VersionedDataObject records in a GridField, GridFieldDetailForm needs to be replaced with VersionedRevertDODetailsForm:
// ... public function getCMSFields() { $fields = parent::getCMSFields(); $fields->addFieldToTab( 'Root.Slices', new GridField( 'Slices', 'Slices', $this->Slices(), $config = GridFieldConfig_RelationEditor::create() ) ); $config->removeComponentsByType('GridFieldDetailForm'); $config->addComponent(new VersionedRevertDODetailsForm()); return $fields; } // ...
Versioned DataObjects in a ModelAdmin
class SliceAdmin extends VersionedRevertModelAdmin { private static $menu_title = 'Slices'; private static $url_segment = 'slice'; private static $managed_models = [ 'Slice' ]; }
Notes
This module is intended to be compatible with the betterbuttons module. Toward that end, it removes the betterbuttons's Versioning button group in order to keep in tact the buttons added by the versiondataobjects plug-in. This change affects only the forms configured with the VersionedRevertDODetailsForm extension.
bluehousegroup/silverstripe-data-object-version-viewer 适用场景与选型建议
bluehousegroup/silverstripe-data-object-version-viewer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 13.17k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2015 年 05 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「version」 「silverstripe」 「data objects」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bluehousegroup/silverstripe-data-object-version-viewer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bluehousegroup/silverstripe-data-object-version-viewer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bluehousegroup/silverstripe-data-object-version-viewer 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Shoot aims to make providing data to your templates more manageable
Versioning behaviour for eloquent models
Adds the EDTF data type to Wikibase
Converts SemVer version (like Composer packages) into integer version with operators. Helps managing versions: store, compare, sort and retrive by conditions.
A simple library that allows transform any kind of data to native php data or whatever
Display a version number
统计信息
- 总下载量: 13.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 31
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2015-05-11
