Skip to content

Commit

Permalink
ENH Add versioning to Link
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Sep 26, 2023
1 parent 7a16b8b commit 72c1c40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion _config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@

// Avoid creating global variables
call_user_func(function () {

});
5 changes: 5 additions & 0 deletions src/Models/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\View\Requirements;
use SilverStripe\Versioned\Versioned;

/**
* A Link Data Object. This class should be a subclass, and you should never directly interact with a plain Link
Expand All @@ -32,6 +33,10 @@ class Link extends DataObject implements JsonData, Type
'Title' => 'Varchar',
'OpenInNew' => 'Boolean',
];

private static array $extensions = [
Versioned::class
];

/**
* In-memory only property used to change link type
Expand Down

0 comments on commit 72c1c40

Please sign in to comment.