class CategoryUI extends UI (View source)

CategoryUI Object

Customization for Category Filters in Dashboards.

Constants

TYPE

Type of UI object

Methods

__construct( array $config = array())

Creates a new CategoryUI object

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 UI object type

from  UI
UI
label( string $label)

The label to display next to the category picker.

from  UI
UI
labelSeparator( string $labelSeparator)

A separator string appended to the label, to visually separate the label from the control.

from  UI
UI
labelStacking( string $labelStacking)

Whether the label should display above or beside the control.

from  UI
UI
cssClass( string $cssClass)

The CSS class to assign to the control, for custom styling.

from  UI
caption( string $caption)

The caption to display inside the value picker widget when no item is selected.

sortValues( boolean $sortValues)

Whether the values to choose from should be sorted.

selectedValuesLayout( string $selectedValuesLayout)

How to display selected values, when multiple selection is allowed.

allowNone( boolean $allowNone)

Whether the user is allowed not to choose any value.

allowMultiple( boolean $allowMultiple)

Whether multiple values can be selected, rather than just one.

allowTyping( boolean $allowTyping)

Allow typing in a text field for filtering.

Details

at line 52
__construct( array $config = array())

Creates a new CategoryUI object

Parameters

array $config

Exceptions

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 UI at line 41
string getType()

Returns the UI object type

Return Value

string

in UI at line 55
UI label( string $label)

The label to display next to the category picker.

If unspecified, the label of the column the control operates on will be used.

Parameters

string $label Label to display

Return Value

UI

Exceptions

InvalidConfigValue

in UI at line 67
UI labelSeparator( string $labelSeparator)

A separator string appended to the label, to visually separate the label from the control.

Parameters

string $labelSeparator

Return Value

UI

Exceptions

InvalidConfigValue

in UI at line 83
UI labelStacking( string $labelStacking)

Whether the label should display above or beside the control.

Accepted values: - 'vertical' - 'horizontal'

Parameters

string $labelStacking

Return Value

UI

Exceptions

InvalidConfigValue

in UI at line 100
UI cssClass( string $cssClass)

The CSS class to assign to the control, for custom styling.

Parameters

string $cssClass

Return Value

UI

Exceptions

InvalidConfigValue

at line 67
CategoryUI caption( string $caption)

The caption to display inside the value picker widget when no item is selected.

Parameters

string $caption

Return Value

CategoryUI

Exceptions

InvalidConfigValue

at line 79
CategoryUI sortValues( boolean $sortValues)

Whether the values to choose from should be sorted.

Parameters

boolean $sortValues

Return Value

CategoryUI

Exceptions

InvalidConfigValue

at line 97
CategoryUI selectedValuesLayout( string $selectedValuesLayout)

How to display selected values, when multiple selection is allowed.

Possible values are: - 'aside': selected values will display in a single text line next to the value picker widget, - 'below': selected values will display in a single text line below the widget, - 'belowWrapping': similar to below, but entries that cannot fit in the picker will wrap to a new line, - 'belowStacked': selected values will be displayed in a column below the widget.

Parameters

string $selectedValuesLayout

Return Value

CategoryUI

Exceptions

InvalidConfigValue

at line 120
CategoryUI allowNone( boolean $allowNone)

Whether the user is allowed not to choose any value.

If false the user must choose at least one value from the available ones. During control initialization, if the option is set to false and no selectedValues state is given, the first value from the available ones is automatically selected.

Parameters

boolean $allowNone

Return Value

CategoryUI

Exceptions

InvalidConfigValue

at line 132
CategoryUI allowMultiple( boolean $allowMultiple)

Whether multiple values can be selected, rather than just one.

Parameters

boolean $allowMultiple

Return Value

CategoryUI

Exceptions

InvalidConfigValue

at line 147
CategoryUI allowTyping( boolean $allowTyping)

Allow typing in a text field for filtering.

Whether the user is allowed to type in a text field to narrow down the list of possible choices (via an autocompleter), or not.

Parameters

boolean $allowTyping

Return Value

CategoryUI

Exceptions

InvalidConfigValue