Skip to content

Adds a duplicate button to GridField in the CMS that enables duplicating of dataobjects

Notifications You must be signed in to change notification settings

RosebladeMedia/duplicate-dataobject

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SilverStripe 5 Duplicate DataObject

Adds a duplicate button to GridField in the CMS that enables duplicating of dataobjects.

Forked from jinjie/duplicate-dataobject and updated to support SS5.

Installation

composer require roseblade/ss-duplicate-dataobject

Usage Example

This module uses the built in DataObject duplication.

See

// Add component on existing GridField
$fields->fieldByName('Root.Main.MyGridField')
    ->getConfig()
    ->addComponent(new GridFieldDuplicateAction());

// Add component on new GridField
$fields->push(
    GridField::create(
        'MyGridField',
        'MyGridField'
    )->addComponent(new GridFieldDuplicateAction())
);

Author

Developed by Jin Jie @ Swift DevLabs

About

Adds a duplicate button to GridField in the CMS that enables duplicating of dataobjects

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%