PHPackages                             level51/silverstripe-data-object-actions - 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. level51/silverstripe-data-object-actions

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

level51/silverstripe-data-object-actions
========================================

Custom GridField detail form actions for DataObjects

2.0.1(5mo ago)01.5kMITPHPPHP &gt;=8.0

Since Apr 28Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/Level51/silverstripe-data-object-actions)[ Packagist](https://packagist.org/packages/level51/silverstripe-data-object-actions)[ RSS](/packages/level51-silverstripe-data-object-actions/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (1)Versions (16)Used By (0)

SilverStripe DataObject Actions
===============================

[](#silverstripe-dataobject-actions)

Module for Silverstripe 6 allowing to add custom actions for DataObjects to the GridFieldDetailForm. See `0.X` releases for Silverstripe 4 support and `1.X` releases for Silverstripe 5 support.

Installation
------------

[](#installation)

`composer require level51/silverstripe-data-object-actions`

Usage
-----

[](#usage)

```
namespace My\Awesome\Project;

use Level51\DataObjectActions\DataObjectActionProvider;
use Level51\DataObjectActions\DataObjectAction;
use SilverStripe\Forms\FieldList;
use SilverStripe\ORM\DataObject;

// Implement DataObjectActionProvider interface on your DataObject
class MyDataObject extends DataObject implements DataObjectActionProvider {

  // Return a field list containing all custom actions, each one of type DataObjectAction or DataObjectLink
  public function getCustomActions()
  {
    return FieldList::create(
      [
        DataObjectAction::create('myCustomAction', 'My Custom Action')
          ->addExtraClass('btn-outline-primary font-icon-rocket')
          ->setUseButtonTag(true),
        DataObjectLink::create('externalLink', 'External Link', 'https://lvl51.de')
        	->addExtraClass('btn-outline-dark font-icon-external-link')
          ->setNewWindow(true)
      ]
    );
  }

  // Implement the handler method(s)
  public function myCustomAction($data, $form)
  {
    // Do stuff, e.g. set a property
    // Do NOT call $this->write(), this will be done automatically
    // use `setWriteBeforeAction` when creating the action if the record
    // should be written before the action is executed

    // throw a new \SilverStripe\Core\Validation\ValidationException in case something failed

    // Optionally return a success message
    return 'Success message';
  }

}
```

### Usage with DataExtensions

[](#usage-with-dataextensions)

You can update the custom actions of a parent class implementing the DataObjectActionProvider interface using the `updateCustomActions` extension hook.

```
public function updateCustomActions(FieldList $fields)
{
    $fields->push(
        DataObjectAction::create(...)
    );
}
```

To be able to add custom actions to an owner class which is out of your control (e.g. core Member class) you have to use the Level51\\DataObjectActions\\DataExtension class as base class of your extension. With that you are able to use the getCustomActions method as shown above.

Action Options
--------------

[](#action-options)

- use `setIsAlwaysEnabled` to always enable the action, even if the whole edit form is read-only
- use `setWriteBeforeAction` if the record should be written before the action is executed

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

[](#requirements)

- SilverStripe ^6
- PHP &gt;= 8.0

Maintainer
----------

[](#maintainer)

- Level51

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance70

Regular maintenance activity

Popularity18

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~189 days

Recently: every ~153 days

Total

12

Last Release

177d ago

Major Versions

0.4.3 → 1.0.02024-05-06

0.4.4 → 1.0.12025-12-01

1.0.1 → 2.0.02026-01-08

PHP version history (2 changes)0.1.0PHP &gt;=7.0

1.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/441f0e8f95c17048417a33f37e35d5ffdd4c07902cbedaf7f5786f4b7c454284?d=identicon)[JZubero](/maintainers/JZubero)

---

Top Contributors

[![dkliemsch](https://avatars.githubusercontent.com/u/13777159?v=4)](https://github.com/dkliemsch "dkliemsch (34 commits)")

---

Tags

silverstripe

### Embed Badge

![Health badge](/badges/level51-silverstripe-data-object-actions/health.svg)

```
[![Health](https://phpackages.com/badges/level51-silverstripe-data-object-actions/health.svg)](https://phpackages.com/packages/level51-silverstripe-data-object-actions)
```

###  Alternatives

[silverstripe/userforms

UserForms enables CMS users to create dynamic forms via a drag and drop interface and without getting involved in any PHP code

1371.1M85](/packages/silverstripe-userforms)[symbiote/silverstripe-gridfieldextensions

A collection of useful grid field components

951.9M271](/packages/symbiote-silverstripe-gridfieldextensions)[symbiote/silverstripe-advancedworkflow

Adds configurable workflow support to the CMS, with a GUI for creating custom workflow definitions.

46302.4k9](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/tagfield

Tag field for SilverStripe

561.3M50](/packages/silverstripe-tagfield)[jonom/silverstripe-betternavigator

Front-end utility menu for Silverstripe websites featuring administration and development tools

60435.1k13](/packages/jonom-silverstripe-betternavigator)[lekoala/silverstripe-cms-actions

Add actions to your models in SilverStripe

39344.8k31](/packages/lekoala-silverstripe-cms-actions)

PHPackages © 2026

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