2017 © Pedro Peláez
 

silverstripe-vendormodule versionhistoryfield

Field that hows a simple version history of a versioned DataObject.

image

silvercommerce/versionhistoryfield

Field that hows a simple version history of a versioned DataObject.

  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 400 % Grown

The README.md

SilverStripe VersionHistoryField

Scrutinizer Code Quality, (*1)

Simple field that lists changes made to an associated "Versioned" DataObject, (*2)

Designed to be used with SilverCommerce Estimates, Invoices and contacts, but should work equally well with any other DataObject, (*3)

Installing

Install via composer:, (*4)

composer require silvercommerce/versionhistoryfield

Then flush, (*5)

Usage

You can add this field to any form that represents a DataObject that uses Versioned. It will output a simple list of changes. For example, to add to YourObject::getCMSFields() use:, (*6)

class YourDataObject extends DataObject
{
    ...

    public function getCMSFields()
    {
        $fields = parent::getCMSFields();

        $fields->addFieldToTab(
            "Root.History",
            VersionHistoryField::create(
                "History",
                _t("SilverCommerce\VersionHistoryField.History", "History"),
                $this
            )->addExtraClass("stacked") // make the field full width
        );

        return $fields;
    }

    ...
}

The Versions

29/04 2018

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/silvercommerce/versionhistoryfield

Field that hows a simple version history of a versioned DataObject.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms versioned formfield

29/04 2018

1.0.1

1.0.1.0 https://github.com/silvercommerce/versionhistoryfield

Field that hows a simple version history of a versioned DataObject.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms versioned formfield

28/04 2018

1.0.0

1.0.0.0 https://github.com/silvercommerce/versionhistoryfield

Field that hows a simple version history of a versioned DataObject.

  Sources   Download

BSD-3-Clause

The Requires

 

silverstripe forms versioned formfield