gorriecoe/silverstripe-dataobjecthistory

Adds a history tab to dataobjects

Installs: 13 122

Dependents: 2

Suggesters: 0

Security: 0

Stars: 6

Watchers: 1

Forks: 1

Open Issues: 2

Type:silverstripe-vendormodule

1.2.2 2018-05-01 01:38 UTC

This package is auto-updated.

Last update: 2022-04-29 00:52:14 UTC


README

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