2017 © Pedro Peláez
 

silverstripe-module silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

image

flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  • Thursday, June 21, 2018
  • by FelixEggmann
  • Repository
  • 1 Watchers
  • 2 Stars
  • 156 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 17 Versions
  • 19 % Grown

The README.md

SilverStripe Versioned Relations Module

This module provides the possibility to version silverstripe data object's many-many, has-many and has-one relations., (*1)

Usage

Main class, (*2)


class MyObject extends DataObject { private static $extensions = array( 'Versioned', 'VersionedRelationsExtension', ); private static $versioned_many_many = array( 'MMRelations' => 'MyRelatedObjectX', ); private static $versioned_has_many = array( 'HMRelations' => 'MyRelatedObjectY', ); private static $versioned_has_one = array( 'HORelation' => 'MyRelatedObjectZ', ); // optionally add extra fields for many-many relations private static $many_many_extraFields = array( 'Relations' => array( 'MyExtra' => 'Int', ), ); }

MyRelatedObjectX class (many-many), (*3)


class MyRelatedObjectX extends DataObject { private static $extensions = array( 'Versioned', 'VersionedRelationsExtension', ); private static $versioned_belongs_many_many = array( 'MainClasses' => 'MainClass', ); /* * NOTE: * If you use the betterbuttons module, * get rid of the versioning buttons like this: */ public function getBetterButtonsActions() { $fieldList = FieldList::create(array( BetterButton_SaveAndClose::create(), BetterButton_Save::create(), )); return $fieldList; } }

MyRelatedObjectY class (has-many), (*4)


class MyRelatedObjectY extends DataObject { private static $extensions = array( 'Versioned', 'VersionedRelationsExtension', ); private static $versioned_belongs_has_many = array( 'MainClass' => 'MainClass', ); }

MyRelatedObjectZ class (has-one), (*5)


class MyRelatedObjectY extends DataObject { private static $extensions = array( 'Versioned', 'VersionedRelationsExtension', ); private static $versioned_belongs_to = array( 'MainClass' => 'MainClass', ); }

Getting the versioned relations:, (*6)


… $this->getVersionedRelation('Relations'); …

TODO

  • Check deletion of relations and main classes
  • Check Multiple Relations on same class in dot notations
  • Add Silverstripe 4 compatibility

The Versions

21/06 2018

dev-master

9999999-dev http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

21/06 2018

0.1.14

0.1.14.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

21/06 2018

dev-develop

dev-develop http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

14/03 2018

0.1.13

0.1.13.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

13/03 2018

0.1.12

0.1.12.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

05/03 2018

0.1.11

0.1.11.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

13/02 2018

0.1.10

0.1.10.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

30/01 2018

0.1.9

0.1.9.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

30/01 2018

0.1.8

0.1.8.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

14/03 2017

0.1.7

0.1.7.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

09/03 2017

0.1.5

0.1.5.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

09/03 2017

0.1.6

0.1.6.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

09/03 2017

0.1.4

0.1.4.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

09/03 2017

0.1.3

0.1.3.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

09/03 2017

0.1.2

0.1.2.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

29/01 2017

0.1.1

0.1.1.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned

29/01 2017

0.1.0

0.1.0.0 http://github.com/flxlabs/silverstripe-versionedrelations

Enable versioning and rollback of many-many relations

  Sources   Download

BSD-3-Clause

The Requires

 

by Felix Eggmann

silverstripe versioned