PHPackages                             unisolutions/silverstripe-copybutton - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. unisolutions/silverstripe-copybutton

ActiveSilverstripe-module[Utility &amp; Helpers](/categories/utility)

unisolutions/silverstripe-copybutton
====================================

Adds copy button to the GridField.

v1.0.0(11y ago)1736.4k20[3 issues](https://github.com/unisolutions/silverstripe-copybutton/issues)[1 PRs](https://github.com/unisolutions/silverstripe-copybutton/pulls)PHP

Since Nov 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/unisolutions/silverstripe-copybutton)[ Packagist](https://packagist.org/packages/unisolutions/silverstripe-copybutton)[ RSS](/packages/unisolutions-silverstripe-copybutton/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

silverstripe-copybutton
=======================

[](#silverstripe-copybutton)

Adds copy button to the GridField

Maintainer Contact
------------------

[](#maintainer-contact)

Elvinas Liutkevičius

&lt;elvinas (at) unisolutions (dot) eu&gt;

Requirements
------------

[](#requirements)

SilverStripe 3

Documentation
-------------

[](#documentation)

Simply install the module using the standard method.

To add the button to the GridField you need to extend ModelAdmin and override getEditForm() method like this:

```
function getEditForm($id = null, $fields = null) {
	$form = parent::getEditForm();

	$form
		->Fields()
		->fieldByName($this->sanitiseClassName($this->modelClass))
		->getConfig()
		->addComponent(new GridFieldCopyButton(), 'GridFieldEditButton') // or just ->addComponent(new GridFieldCopyButton())
	;

	return $form;
}

```

This action will make exact copy of the record (with all relations and etc.). Sometimes you will need to do some actions just after copy operation (i.e. you'll need to remove some relations). It is easily achieved by extending DataObject and writing all the actions in the onAfterDuplicate() method.

```
class SomeObjectExtension extends DataExtension {

	public function onAfterDuplicate() {
		DB::query("delete from Member_SomeObject where SomeObjectID = ".$this->owner->ID);
	}

}

```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 51.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~30 days

Total

3

Last Release

4142d ago

Major Versions

v0.8.0 → v1.0.02015-01-14

### Community

Maintainers

![](https://www.gravatar.com/avatar/196e5dd34823268010060b8f5121b7621d1ef1b66c3c91bb09ab84a3c40b26ef?d=identicon)[uniun](/maintainers/uniun)

---

Top Contributors

[![elvinas-liut](https://avatars.githubusercontent.com/u/2812754?v=4)](https://github.com/elvinas-liut "elvinas-liut (15 commits)")[![uniun](https://avatars.githubusercontent.com/u/92462659?v=4)](https://github.com/uniun "uniun (7 commits)")[![sheadawson](https://avatars.githubusercontent.com/u/1166136?v=4)](https://github.com/sheadawson "sheadawson (2 commits)")[![yusuf](https://avatars.githubusercontent.com/u/90121?v=4)](https://github.com/yusuf "yusuf (2 commits)")[![Taitava](https://avatars.githubusercontent.com/u/13002142?v=4)](https://github.com/Taitava "Taitava (1 commits)")[![adiwidjaja](https://avatars.githubusercontent.com/u/280394?v=4)](https://github.com/adiwidjaja "adiwidjaja (1 commits)")[![thomasbnielsen](https://avatars.githubusercontent.com/u/2331955?v=4)](https://github.com/thomasbnielsen "thomasbnielsen (1 commits)")

---

Tags

silverstripecopybutton

### Embed Badge

![Health badge](/badges/unisolutions-silverstripe-copybutton/health.svg)

```
[![Health](https://phpackages.com/badges/unisolutions-silverstripe-copybutton/health.svg)](https://phpackages.com/packages/unisolutions-silverstripe-copybutton)
```

###  Alternatives

[silverstripe/multi-domain

Allows multiple domains to access one CMS instance, mapping them to different sections of the hierarchy

141.6k](/packages/silverstripe-multi-domain)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
