mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #9465 from mattclegg/1586758562
DOCS: Update to show default functionality of VersionedGridfieldDetailForm
This commit is contained in:
commit
956f312a37
@ -269,19 +269,16 @@ the shortcode references the database identifier of the `Image` object.
|
|||||||
|
|
||||||
### Controlling how CMS users interact with versioned DataObjects
|
### Controlling how CMS users interact with versioned DataObjects
|
||||||
|
|
||||||
By default the versioned module includes a `VersionedGridfieldDetailForm` that can extend gridfield with versioning support for models.
|
By default the versioned module includes a `VersionedGridfieldDetailForm` that extends gridfield with versioning support for DataObjects.
|
||||||
|
|
||||||
You can enable this on a per-model basis using the following code:
|
You can disable this on a per-model basis using the following code:
|
||||||
|
|
||||||
```php
|
```php
|
||||||
<?php
|
<?php
|
||||||
use SilverStripe\ORM\DataObject;
|
use SilverStripe\ORM\DataObject;
|
||||||
use SilverStripe\Versioned\Versioned;
|
use SilverStripe\Versioned\Versioned;
|
||||||
class MyBanner extends DataObject {
|
class MyBanner extends DataObject {
|
||||||
private static $extensions = [
|
private static $versioned_gridfield_extensions = false;
|
||||||
Versioned::class,
|
|
||||||
];
|
|
||||||
private static $versioned_gridfield_extensions = true;
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user