PHPackages                             silverware/model-filters - 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. silverware/model-filters

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

silverware/model-filters
========================

SilverWare Model Filters Module.

1.1.0(7y ago)335921BSD-3-ClausePHPPHP &gt;=5.6.0

Since May 29Pushed 2y ago1 watchersCompare

[ Source](https://github.com/praxisnetau/silverware-model-filters)[ Packagist](https://packagist.org/packages/silverware/model-filters)[ Docs](https://github.com/praxisnetau/silverware-model-filters)[ RSS](/packages/silverware-model-filters/feed)WikiDiscussions master Synced 3d ago

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

SilverWare Model Filters Module
===============================

[](#silverware-model-filters-module)

[![Latest Stable Version](https://camo.githubusercontent.com/438681cf83be9ed801aa0e2e37de10d1f5c6d408a12d73469efc4033d7babdc5/68747470733a2f2f706f7365722e707567782e6f72672f73696c766572776172652f6d6f64656c2d66696c746572732f762f737461626c65)](https://packagist.org/packages/silverware/model-filters)[![Latest Unstable Version](https://camo.githubusercontent.com/4470f53d1073d87c399fb32ed10b4709b95220f748ad9b6c24477b17c8116631/68747470733a2f2f706f7365722e707567782e6f72672f73696c766572776172652f6d6f64656c2d66696c746572732f762f756e737461626c65)](https://packagist.org/packages/silverware/model-filters)[![License](https://camo.githubusercontent.com/fe585537e274b40d8cd364f45041a7ae0125a8aee21d72f329d6dc35f5b9c21b/68747470733a2f2f706f7365722e707567782e6f72672f73696c766572776172652f6d6f64656c2d66696c746572732f6c6963656e7365)](https://packagist.org/packages/silverware/model-filters)

Extends the [SilverStripe v4](https://github.com/silverstripe/silverstripe-framework) `ModelAdmin` to support filtering of versioned data objects.

Contents
--------

[](#contents)

- [Background](#background)
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Issues](#issues)
- [Contribution](#contribution)
- [Maintainers](#maintainers)
- [License](#license)

Background
----------

[](#background)

Traditionally, versioning in SilverStripe has been the sole domain of `SiteTree` objects within the CMS, such as the ubiquitous `Page` class. With the advent of SilverStripe v4, versioning is now used in other areas of the CMS, such as assets.

You can add versioning to your own model classes by using the [`Versioned`](https://github.com/silverstripe/silverstripe-versioned) extension. `ModelAdmin` supports versioned data objects out of the box, however filtering these objects by their status is a bit trickier.

Enter `silverware/model-filters`. After installation of this module, your versioned data objects will have a status dropdown field added to the filter form that appears within `ModelAdmin`, allowing the user to filter records by their versioning status:

[![Record Status Filter](https://camo.githubusercontent.com/59cb2f76b211df71b8107def845387a26c743739120e62832a4475ee26e49dd3/687474703a2f2f692e696d6775722e636f6d2f383431524363452e706e67)](https://camo.githubusercontent.com/59cb2f76b211df71b8107def845387a26c743739120e62832a4475ee26e49dd3/687474703a2f2f692e696d6775722e636f6d2f383431524363452e706e67)

You can also add `StatusBadges` to your `$summary_fields` to show the versioning status within your model admin grid field:

[![Record Status Badges](https://camo.githubusercontent.com/76cef740bef8139c8daa9a3a871de184bf2209ae4e43a534803242f12c464979/687474703a2f2f692e696d6775722e636f6d2f385055787351332e706e67)](https://camo.githubusercontent.com/76cef740bef8139c8daa9a3a871de184bf2209ae4e43a534803242f12c464979/687474703a2f2f692e696d6775722e636f6d2f385055787351332e706e67)

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

[](#requirements)

- [SilverStripe Framework v4](https://github.com/silverstripe/silverstripe-framework)
- [SilverStripe Admin](https://github.com/silverstripe/silverstripe-admin)
- [SilverStripe Versioned](https://github.com/silverstripe/silverstripe-versioned)

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

[](#installation)

Installation is via [Composer](https://getcomposer.org):

```
$ composer require silverware/model-filters

```

Usage
-----

[](#usage)

Once installed, `Versioned` data objects within `ModelAdmin` will be automatically detected and a status field will appear within the filter form for each object.

In order to show status badges within the grid field for your versioned objects, simply add `StatusBadges` to your `$summary_fields` static, for example:

```
private static $summary_fields = [
  ...
  'StatusBadges',
  ...
];
```

### Status Field Positioning

[](#status-field-positioning)

By default, the status dropdown field will be added to the end of your search filter fields for each versioned object. To control where the field appears, add one of the following methods to your `ModelAdmin` subclass:

```
public function getStatusFieldBefore()
{
    return 'NameOfField';  // will appear before this field
}
```

```
public function getStatusFieldAfter()
{
    return 'NameOfField';  // will appear after this field
}
```

You could also detect the current model class via `$this->modelClass` and answer a different field name, if required:

```
public function getStatusFieldAfter()
{
    switch ($this->modelClass) {
        case FirstModel::class:
            return 'AfterThisField';
        case SecondModel::class:
            return 'AfterAnotherField';
    }
}
```

### Status Field Title

[](#status-field-title)

By default, the title of the status dropdown field is "Record status". The title is obtained by calling `getStatusFieldTitle()` on the `ModelAdmin` subclass. The method added via the extension supports `i18n` via the usual SilverStripe conventions, however you can also override the method in your `ModelAdmin` subclass to answer a different field title:

```
public function getStatusFieldTitle()
{
    return 'New field title';
}
```

Issues
------

[](#issues)

Please use the [GitHub issue tracker](https://github.com/praxisnetau/silverware-model-filters/issues) for bug reports and feature requests.

Contribution
------------

[](#contribution)

Your contributions are gladly welcomed to help make this project better. Please see [contributing](CONTRIBUTING.md)for more information.

Maintainers
-----------

[](#maintainers)

[![Colin Tucker](https://avatars3.githubusercontent.com/u/1853705?s=144)](https://github.com/colintucker)[![Praxis Interactive](https://avatars2.githubusercontent.com/u/1782612?s=144)](https://www.praxis.net.au)[Colin Tucker](https://github.com/colintucker)[Praxis Interactive](https://www.praxis.net.au)License
-------

[](#license)

[BSD-3-Clause](LICENSE.md) © Praxis Interactive

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

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 ~63 days

Recently: every ~90 days

Total

7

Last Release

2894d ago

Major Versions

0.1.0 → 1.0.02017-06-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/f5d47a59cd183aa3f599c2b66dfce7c79c249c2eacb749f0ac8c38c4ca273d14?d=identicon)[PraxisNetAu](/maintainers/PraxisNetAu)

---

Top Contributors

[![colintucker](https://avatars.githubusercontent.com/u/1853705?v=4)](https://github.com/colintucker "colintucker (12 commits)")

---

Tags

filtersmodelmodeladminsilverstripe-4silverwaresilverstripemodelfiltersmodeladminsilverware

### Embed Badge

![Health badge](/badges/silverware-model-filters/health.svg)

```
[![Health](https://phpackages.com/badges/silverware-model-filters/health.svg)](https://phpackages.com/packages/silverware-model-filters)
```

###  Alternatives

[silverstripe/cms

The SilverStripe Content Management System

5163.4M1.3k](/packages/silverstripe-cms)[silverstripe/subsites

Run multiple sites from a single SilverStripe install.

65392.9k20](/packages/silverstripe-subsites)[symbiote/silverstripe-advancedworkflow

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

46295.2k7](/packages/symbiote-silverstripe-advancedworkflow)[silverstripe/environmentcheck

Provides an API for building environment tests

35503.8k13](/packages/silverstripe-environmentcheck)[markguinn/silverstripe-gridfieldmultiselect

Gridfield extensions to add checkboxes for each row to easily delete or perform actions on multiple rows.

115.9k](/packages/markguinn-silverstripe-gridfieldmultiselect)[wedevelopnl/silverstripe-elemental-grid

Elemental grid module

1014.1k2](/packages/wedevelopnl-silverstripe-elemental-grid)

PHPackages © 2026

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