Sidebar widget for lists of selectable items.
- Author
- Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL 2 or later
- Since
- 3.1
◆ __construct()
__construct |
( |
|
$title, |
|
|
|
$url, |
|
|
|
$name, |
|
|
|
$method = 'get' , |
|
|
|
$multiple = false |
|
) |
| |
Constructs the widget by defining a special template.
- Parameters
-
string | $title | Diplayed title |
string | $url | Target url |
string | $name | Name of the input element |
string | $method | Request method |
boolean | $multiple | Defines whether selecting multiple values is allowed |
◆ arrayToHiddenInput()
static arrayToHiddenInput |
( |
array |
$array, |
|
|
|
$prefix = '' |
|
) |
| |
|
static |
Converts the given array to a list of hidden inputs FIXME this duplicates what addHiddenFields() does.
- Parameters
-
array | $array | Array to convert |
string | $prefix | Optional prefix for the input name |
- Returns
- string list of hidden inputs as html
◆ hasNestedElements()
Returns whether this element has nested subelements
- Returns
- boolean true if element has nested subelements
◆ render()
render |
( |
|
$variables = [] | ) |
|
Renders the select widget
- Parameters
-
array | $variables | Additional vaiarbles |
- Returns
- string rendered widget as ghtml
◆ setDropdownAutoWidth()
setDropdownAutoWidth |
( |
|
$dropdownAutoWidth | ) |
|
set the dropdown auto width (default: false)
- Parameters
-
- Returns
- void
◆ setMaxLength()
Sets the maximum length of the input
- Parameters
-
◆ setMultiple()
Sets whether selecting multiple values is allowed or not
- Parameters
-
bool | $multiple | true if selection multiple values should be allowed |
◆ setOnSubmitHandler()
setOnSubmitHandler |
( |
|
$onsubmit | ) |
|
◆ setOptions()
setOptions |
( |
array |
$options, |
|
|
|
$selected = false |
|
) |
| |
Sets the options for the select element
- Parameters
-
array | $options | Options as associative array (value => label) |
mixed | $selected | The initially selected value |
◆ setRequestMethod()
setRequestMethod |
( |
|
$method | ) |
|
Sets the request method
- Parameters
-
string | $method | [description] |
◆ setSelection()
Sets the selected value.
- Parameters
-
mixed | $value | Selected value |
◆ setSelectParameterName()
setSelectParameterName |
( |
|
$name | ) |
|
Sets the name of the select input element
- Parameters
-
String | $name | Name of the input element |
◆ setUrl()
Sets the target url
- Parameters
-
◆ $onsubmit
The documentation for this class was generated from the following file: