class CategoryFilter extends Filter (View source)

Category Filter Class

A picker to choose one or more between a set of defined values.

Constants

TYPE

Type of Filter.

Methods

__construct( array $columnLabelOrIndex, array $config = array())

Creates the new Filter object to filter the given column label or index.

mixed
__get( string $option)

Get the value of a set option via magic method.

from  JsonConfig
getOptions()

Gets the Options object for the JsonConfig

from  JsonConfig
setOption( string $option, mixed $value)

Shortcut method to set the value of an option and return $this.

from  JsonConfig
setOptions( array $config)

Parses the config array by passing the values through each method to check validity against if the option exists.

from  JsonConfig
array
jsonSerialize()

Custom serialization of the JsonConfig object.

from  JsonConfig
string
getType()

Returns the Filter type.

from  Filter
filterColumnIndex( integer $columnIndex)

The column of the datatable the filter should operate upon.

from  Filter
filterColumnLabel( string $columnLabel)

The label of the column the filter should operate upon.

from  Filter
ui( array $uiConfig)

Assigns custom attributes to the controls that the filter is attached to.

from  Filter
Category
useFormattedValue( boolean $useFormattedValue)

Selects whether to use the DataTable values or the formatted values.

Category
values( array $values)

List of values to choose from.

Details

at line 50
__construct( array $columnLabelOrIndex, array $config = array())

Creates the new Filter object to filter the given column label or index.

Parameters

array $columnLabelOrIndex
array $config

Exceptions

InvalidConfigProperty
InvalidConfigValue

in JsonConfig at line 64
mixed __get( string $option)

Get the value of a set option via magic method.

Parameters

string $option Name of option.

Return Value

mixed

Exceptions

InvalidConfigProperty

in JsonConfig at line 75
Options getOptions()

Gets the Options object for the JsonConfig

Return Value

Options

in JsonConfig at line 90
JsonConfig setOption( string $option, mixed $value)

Shortcut method to set the value of an option and return $this.

In order to maintain backwards compatibility, ConfigObjects will be unwrapped.

Parameters

string $option Option to set.
mixed $value Value of the option.

Return Value

JsonConfig

in JsonConfig at line 106
setOptions( array $config)

Parses the config array by passing the values through each method to check validity against if the option exists.

Parameters

array $config

Exceptions

InvalidConfigValue
InvalidConfigProperty

in JsonConfig at line 275
array jsonSerialize()

Custom serialization of the JsonConfig object.

Return Value

array

in Filter at line 82
string getType()

Returns the Filter type.

Return Value

string

in Filter at line 97
Filter filterColumnIndex( integer $columnIndex)

The column of the datatable the filter should operate upon.

It is mandatory to provide either this option or filterColumnLabel. If both present, this option takes precedence.

Parameters

integer $columnIndex Column index

Return Value

Filter

Exceptions

InvalidConfigValue

in Filter at line 111
Filter filterColumnLabel( string $columnLabel)

The label of the column the filter should operate upon.

It is mandatory to provide either this option or filterColumnIndex. If both present, filterColumnIndex takes precedence.

Parameters

string $columnLabel Column label

Return Value

Filter

Exceptions

InvalidConfigValue

in Filter at line 122
Filter ui( array $uiConfig)

Assigns custom attributes to the controls that the filter is attached to.

Parameters

array $uiConfig Array of options for configuring the UI

Return Value

Filter

at line 68
Category useFormattedValue( boolean $useFormattedValue)

Selects whether to use the DataTable values or the formatted values.

When populating the list of selectable values automatically from the DataTable column this filter operates on, whether to use the actual cell values or their formatted values.

Parameters

boolean $useFormattedValue

Return Value

Category

Exceptions

InvalidConfigValue

at line 83
Category values( array $values)

List of values to choose from.

If an array of Objects is used, they should have a suitable toString() representation for display to the user. If null or undefined, the list of values will be automatically computed from the values present in the DataTable column this control operates on.

Parameters

array $values

Return Value

Category

Exceptions

InvalidConfigValue