Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 849 Bytes

README.md

File metadata and controls

42 lines (32 loc) · 849 Bytes

Silverstripe dataobjecthistory

Adds a history tab to dataobjects

Installation

Composer is the recommended way of installing SilverStripe modules.

composer require gorriecoe/silverstripe-dataobjecthistory

Requirements

  • silverstripe/framework ^4.0
  • symbiote/silverstripe-gridfieldextensions ^3.1

Maintainers

Example

<?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;
    }
}