Adds a history tab to dataobjects
Composer is the recommended way of installing SilverStripe modules.
composer require gorriecoe/silverstripe-dataobjecthistory
- silverstripe/framework ^4.0
- symbiote/silverstripe-gridfieldextensions ^3.1
<?php
use SilverStripe\Versioned\Versioned;
use gorriecoe\DataObjectHistory\extensions\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;
}
}