gorriecoe/silverstripe-dataobjecthistory

Adds a history tab to dataobjects

Installs: 30 413

Dependents: 1

Suggesters: 0

Security: 0

Stars: 6

Watchers: 2

Forks: 7

Open Issues: 3

Type:silverstripe-vendormodule

1.2.2 2018-05-01 01:38 UTC

This package is auto-updated.

Last update: 2024-11-29 05:32:49 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;
    }
}