Class SelectField
Select field.
A select field can have one or more objects selected.
-
Tev\Field\Model\AbstractField
implements
Tev\Contracts\WordpressWrapperInterface
-
Tev\Field\Model\SelectField
Methods summary
public
mixed
|
#
getValue( )
Get the selected options.
Get the selected options.
Returns
mixed Single selected option, or array of selected options
|
public
mixed
|
#
selected( )
Get the selected option values.
Get the selected option values.
Returns
mixed Single selected option value, or array of selected options values
|
public
array
|
#
options( )
Get all available options from this select.
Get all available options from this select.
Returns
array Key-value pairs (values to labels)
|
public
boolean
|
#
isSelected( mixed $val )
Check if the given value is selected.
Check if the given value is selected.
Parameters
Returns
boolean True if selected, false if not
|
public
boolean
|
#
isMulti( )
Check if this is a multi-select or not.
Check if this is a multi-select or not.
Returns
boolean True if multi-select, false if not
|
public
string
|
#
__toString( )
Get a string representation of this selected options.
Get a string representation of this selected options.
If this is a multi-select, values will be comma-space separated.
Returns
string
Overrides
|