\Dewdrop\Fields\FilterCallback

A filter that uses a custom callback to determine which fields should be accepted. Your callback will be given be called one time for each field, with a field passed as the first argument to your callback each time. If you return true, the field will be included. Otherwise, it will not.

Summary

Methods
Properties
Constants
__construct()
apply()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$callback
N/A

Properties

$callback

$callback : callable

The callback that should be used for filtering.

Type

callable

Methods

__construct()

__construct(callable  $callback) 

Provide the callback that will be used for filtering.

Parameters

callable $callback

apply()

apply(\Dewdrop\Fields  $fields) : \Dewdrop\Fields

Filter the supplied Fields object using the filter's callback.

Parameters

\Dewdrop\Fields $fields

Returns

\Dewdrop\Fields