PHPackages                             webbuilders-group/silverstripe-add-to-campaigns - 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. webbuilders-group/silverstripe-add-to-campaigns

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

webbuilders-group/silverstripe-add-to-campaigns
===============================================

Capability to add any Versioned object to a campaign easily for CMS Admins

2.0.0(1y ago)37.2k—10%[1 issues](https://github.com/webbuilders-group/silverstripe-add-to-campaigns/issues)BSD-3-ClausePHP

Since Apr 23Pushed 1y ago4 watchersCompare

[ Source](https://github.com/webbuilders-group/silverstripe-add-to-campaigns)[ Packagist](https://packagist.org/packages/webbuilders-group/silverstripe-add-to-campaigns)[ RSS](/packages/webbuilders-group-silverstripe-add-to-campaigns/feed)WikiDiscussions master Synced 2d ago

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

Add to Campaigns
================

[](#add-to-campaigns)

Capability to add any Versioned object to a campaign easily for CMS Admins via an "Add to Campaign" button in the CMS just like pages.

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

[](#maintainer-contact)

- Ed Chipman ([UndefinedOffset](https://github.com/UndefinedOffset))

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

[](#requirements)

- SilverStripe Campaign Admin ~3.0

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

[](#installation)

```
composer require webbuilders-group/silverstripe-add-to-campaigns

```

Usage
-----

[](#usage)

By default all `SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest` instances will get an extension that will automatically configure the `GridFieldDetailForm_ItemRequest` edit form for the "Add to Campaign" functionality for all allowed classes. To add a class to the allowed support in your `config.yml` you must add the below. The `DataObject` must include the `SilverStripe\Versioned\Versioned` extension as well.

```
WebbuildersGroup\AddToCampaigns\Control\Admin\AddToCampaignController:
  campaignable_classes:
    - 'Full\DataObject\ClassName\Including\Namespace'
```

If you have not modified your `GridFieldDetailForm_ItemRequest` actions from the default `GridFieldDetailForm_ItemRequest::getFormActions()` the "Add to Campaign" button should be automatically be added to all allowed classes. If you have you can add the following to where ever you are setting up your form actions for your `DataObject` in your `GridFieldDetailForm_ItemRequest` extension.

```
use SilverStripe\CampaignAdmin\AddToCampaignHandler_FormAction;

/** ... **/

if (($myDataObject->isPublished() || $myDataObject->isOnDraft()) && $myDataObject->canPublish()) {
    $moreOptions->push(
        AddToCampaignHandler_FormAction::create()
            ->removeExtraClass('btn-primary')
            ->addExtraClass('btn-secondary')
    );
}
```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance42

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 76.9% 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 ~752 days

Total

4

Last Release

373d ago

Major Versions

1.x-dev → 2.0.02025-06-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/4339255555acb728d7708895663e2a047a73c09f4394aa25bf038817e2d25d44?d=identicon)[WebbuildersGroup](/maintainers/WebbuildersGroup)

---

Top Contributors

[![UndefinedOffset](https://avatars.githubusercontent.com/u/1391558?v=4)](https://github.com/UndefinedOffset "UndefinedOffset (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![aaronmacpherson](https://avatars.githubusercontent.com/u/20426496?v=4)](https://github.com/aaronmacpherson "aaronmacpherson (1 commits)")

---

Tags

silverstripecampaigns

### Embed Badge

![Health badge](/badges/webbuilders-group-silverstripe-add-to-campaigns/health.svg)

```
[![Health](https://phpackages.com/badges/webbuilders-group-silverstripe-add-to-campaigns/health.svg)](https://phpackages.com/packages/webbuilders-group-silverstripe-add-to-campaigns)
```

###  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)
