◆ __construct()
__construct |
( |
|
$caption, |
|
|
|
$name, |
|
|
|
$value = null , |
|
|
|
$size = 1 , |
|
|
|
$multiple = false |
|
) |
| |
Constructor
- Paramètres
-
string | $caption | Caption |
string | $name | "name" attribute |
mixed | $value | Pre-selected value (or array of them). |
int | $size | Number or rows. "1" makes a drop-down-list |
bool | $multiple | Allow multiple selections? |
Réimplémentée dans XoopsFormSelectTheme.
◆ addOption()
addOption |
( |
|
$value, |
|
|
|
$name = '' |
|
) |
| |
Add an option
- Paramètres
-
string | $value | "value" attribute |
string | $name | "name" attribute |
◆ addOptionArray()
addOptionArray |
( |
|
$options | ) |
|
Add multiple options
- Paramètres
-
array | $options | Associative array of value->name pairs |
◆ getOptions()
getOptions |
( |
|
$encode = false | ) |
|
Get an array with all the options
Note: both name and value should be sanitized. However for backward compatibility, only value is sanitized for now.
- Paramètres
-
bool | int | $encode | To sanitizer the text? potential values: 0 - skip; 1 - only for value; 2 - for both value and name |
- Renvoie
- array Associative array of value->name pairs
◆ getSize()
◆ getValue()
getValue |
( |
|
$encode = false | ) |
|
Get an array of pre-selected values
- Paramètres
-
bool | $encode | To sanitizer the text? |
- Renvoie
- array
◆ isMultiple()
Are multiple selections allowed?
- Renvoie
- bool
◆ render()
Prepare HTML for output
- Renvoie
- string HTML
Réimplémentée à partir de XoopsFormElement.
◆ renderValidationJS()
◆ setValue()
Set pre-selected values
- Paramètres
-
◆ $_multiple
◆ $_options
◆ $_size
◆ $_value
La documentation de cette classe a été générée à partir du fichier suivant :