Filter this WireArray to only include items that match the given selector (destructive)
Example
// Filter $items to contain only those with "featured" property having value 1
$items->filter("featured=1");
Usage
$wireArray->filter($selector);
Arguments
Name | Type(s) | Description |
---|---|---|
selector | string, array, Selectors | Selector string or array to use as the filter. |
Return value
$this
reference to current instance.
WireArray methods and properties
API reference based on ProcessWire core version 3.0.236