CRUDKit api-doc [Developer]

Filter
in package

Represents an actual filter (with values) on a record.

For Example: amount > 21.4

Tags
internal

Table of Contents

VALID_OPERATORS  = ['>', '<', '>=', '<=', '=', '!=', 'contains', 'startswith', 'endswith']
$field  : string
$operator  : string
$value  : string
__construct()  : mixed
Constructor.
appendToUrlParams()  : mixed
Adds a filter to an url param array.

Constants

VALID_OPERATORS

public mixed VALID_OPERATORS = ['>', '<', '>=', '<=', '=', '!=', 'contains', 'startswith', 'endswith']

Properties

$field

public string $field

The fieldname the filter is applied to

$operator

public string $operator

['>','<','>=','<=','=','!=','contains','startswith','endswith']

$value

public string $value

The value

Methods

__construct()

Constructor.

public __construct(string $field, string $operator, string $value) : mixed
Parameters
$field : string

The fieldname the filter is applied to

$operator : string

['>','<','>=','<=','=','!=','contains','startswith','endswith']

$value : string

The value

Return values
mixed

appendToUrlParams()

Adds a filter to an url param array.

public appendToUrlParams(array<string|int, mixed> &$urlParams, int $filterNo) : mixed
Parameters
$urlParams : array<string|int, mixed>
$filterNo : int
Return values
mixed

Search results