toastnz / duplicator
Silverstripe relationship duplicator
Installs: 10 695
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
README
Simple module to duplicate relationships by hard-copying them when duplicating objects
Requirements
See composer.json
Usage
Define which relationships should be duplicated in the config.yml
:
Page: duplicator_relations: - Slides
Or directly in the class:
<?php class Page extends SiteTree { private static $many_many = [ 'Slides' => Slide::class ]; private static $duplicator_relations = [ 'Slides' ]; }