Skip to content

Kirby 5.1.2

$assets->filter()

Filters elements by one of the predefined filter methods, by a custom filter function or an array of filters

$assets->filter(Closure|array|string $field): Kirby\Plugin\Assets

Parameters

Name Type Default
$fieldrequired Closureorarrayorstring no default value

Return type

Kirby\Plugin\Assets

This method does not modify the existing $assets object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Plugin\Assets inherited from Kirby\Toolkit\Collection