signify-nz / silverstripe-searchfilter-arraylist
Provides an ArrayList subclass that supports SearchFilter filtering syntax.
Installs: 4 387
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 9
Forks: 2
Open Issues: 0
Type:silverstripe-vendormodule
pkg:composer/signify-nz/silverstripe-searchfilter-arraylist
Requires
- php: >=7.1
 - silverstripe/framework: ^4.0 || ^5.0
 - silverstripe/vendor-plugin: ^1.0 || ^2.0
 
Requires (Dev)
- phpunit/phpunit: ^9.5
 - silverstripe/framework: ^4.10
 - squizlabs/php_codesniffer: ^3.0
 
This package is not auto-updated.
Last update: 2025-10-27 08:49:00 UTC
README
Silverstripe SearchFilter ArrayList
Provides an ArrayList subclass that can be filtered using SearchFilters.
This module is obsolete as of Silverstripe CMS 5.1.0, as the functionality it provides is now in core. Please see this comment for more information.
Installation
Install via composer:
composer require signify-nz/silverstripe-searchfilter-arraylist
If you want to, you can replace (most) instances of ArrayList with this implementation via yaml config:
SilverStripe\Core\Injector\Injector: SilverStripe\ORM\ArrayList: class: Signify\SearchFilterArrayList\SearchFilterableArrayList
Beware however that some code - even potentially within Silverstripe itself - may use the new keyword instead of relying on the Injector when instantiating new ArrayLists. In those cases the original ArrayList class will be used.
Usage
When calling find, filter, filterAny, exclude, or excludeAny on a SearchFilterableArrayList, you can use SearchFilter syntax - the same as if you were calling those methods on a DataList.
All of the SearchFilters and modifiers documented in Silverstripe's SearchFilter documentation should be supported - if you find that isn't the case, please raise an issue or, better yet, a pull request.
If you have implemented your own SearchFilter, you can add support for it via an Extension class - see the extension documentation.