\org_openpsa_core_filter_multiselect

Helper class that encapsulates a multiselect query filter

Summary

Methods
Properties
Constants
__construct()
apply()
render()
set_callback()
add_head_elements()
set_label()
$name
No constants found
_get_options()
_render_actions()
$_options
$_option_callback
$_operator
$_selection
$_label
N/A
No private methods found
No private properties found
N/A

Properties

$name

$name : string

The filter's unique name

Type

string

$_options

$_options : array

The filter's options, if any

Type

array

$_option_callback

$_option_callback : callable

Callabck to load the filter's options

Type

callable

$_operator

$_operator : string

The query operator

Type

string

$_selection

$_selection : array

The filter selection, if any

Type

array

$_label

$_label : string

The filter label

Type

string

Methods

__construct()

__construct(string  $name, string  $operator = '=', array  $options = array()) 

Constructor

Parameters

string $name

The filter's name

string $operator

The constraint operator

array $options

The filter's options, if any

apply()

apply(array  $selection, \midcom_core_query  $query) 

Apply filter to given query

Parameters

array $selection

The filter selection

\midcom_core_query $query

The query object

render()

render() 

Renders the filter widget according to mode

set_callback()

set_callback(  $callback) 

Parameters

$callback

add_head_elements()

add_head_elements() 

set_label()

set_label(  $label) 

Parameters

$label

_get_options()

_get_options() 

Returns an option array for rendering,

May use option_callback config setting to populate the options array

_render_actions()

_render_actions()