Skip to content

gorriecoe/silverstripe-dataobjecthistory

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages