Adds a history tab to dataobjects
Composer is the recommended way of installing Silverstripe modules.
composer require gorriecoe/silverstripe-dataobjecthistory
- silverstripe/framework ^5.0
- symbiote/silverstripe-gridfieldextensions ^4.0
<?php
use SilverStripe\Versioned\Versioned;
use gorriecoe\DataObjectHistory\Extension\DataObjectHistory;
class MyObject extends DataObject
{
private static $extensions = [
Versioned::class . '.versioned',
DataObjectHistory::class
];
public function getCMSFields()
{
$fields = FieldList::create();
...
$this->extend('updateCMSFields', $fields); // Required
return $fields;
}
}
- 3.0.0
- This release is by Quinn Interactive
- Now follows PSR4
- Namespaces have changed from lowercase plural to uppercase singular.
This is a breaking change, so we have incremented to version 3.
gorriecoe\DataObjectHistory\extensions
→gorriecoe\DataObjectHistory\Extension
gorriecoe\DataObjectHistory\forms
→gorriecoe\DataObjectHistory\Form