Skip to content

Kirby 3.9.8

$segments->filter()

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

$segments->filter(string|array|\Closure $field, mixed ...$args = null): Kirby\Query\Segments

Parameters

Name Type Default
$field * string|array|Closure
... $args mixed null

Return type

Kirby\Query\Segments

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

Parent class

Kirby\Query\Segments inherited from Kirby\Toolkit\Collection