WPP-Public/akqa-nz-silverstripe-versioneddataobjects

How to use in Model Admin?

Closed this issue · 2 comments

I've been tinkering for a while, but it's not yet clear to me how to add this to a DataObject I'm managing through Model Admin. For example:

class Event extends DataObject {
  static $db = array(
    'Title' => 'Varchar(255)',
  );

  private static $extensions = array(
      'VersionedDataObject'
  );
}

Which is managed via:

class Event_Admin extends ModelAdmin {
  public static $managed_models = array('Event');
  public static $url_segment = 'events';
  public static $menu_title = 'Events';
}

How do I access the necessary form field config and add/remove the required components?

Hopefully this question makes sense.

There is a VersionedModelAdmin class I believe

Closing this as it's now detailed in the readme.