XOOPS
2.6.0
|
Protected Attributes | |
$value = array() | |
Protected Attributes inherited from Xoops\Form\Element | |
$value = '' | |
Protected Attributes inherited from Xoops\Html\Attributes | |
$attributes = array() | |
Private Attributes | |
$optgroup = array() | |
$options = array() | |
Additional Inherited Members | |
Public Attributes inherited from Xoops\Form\Element | |
$customValidationCode = array() | |
Definition at line 26 of file Select.php.
Xoops\Form\Select::__construct | ( | $caption, | |
$name, | |||
$value = null , |
|||
$size = 1 , |
|||
$multiple = false |
|||
) |
Constructor
string | $caption | Caption |
string | $name | name" attribute |
mixed | $value | Pre-selected value (or array of them). |
integer | $size | Number or rows. "1" makes a drop-down-list |
boolean | $multiple | Allow multiple selections? |
Definition at line 72 of file Select.php.
References Xoops\Form\Element\$caption, $name, Xoops\Form\Select\$value, Xoops\Html\Attributes\setAttribute(), Xoops\Form\Element\setCaption(), and Xoops\Form\Element\setValue().
Xoops\Form\Select::addOptgroup | ( | $name, | |
$optgroup | |||
) |
Add multiple optgroup
string | $name | name attribute |
array | $optgroup | Associative array of value->name pairs |
Definition at line 146 of file Select.php.
References $name, and Xoops\Form\Select\$optgroup.
Xoops\Form\Select::addOption | ( | $value, | |
$name = '' |
|||
) |
Add an option
string | $value | value attribute |
string | $name | name attribute |
Definition at line 113 of file Select.php.
References $name, and Xoops\Form\Select\$value.
Referenced by ImagesImageForm\__construct(), MenusMenus_menuForm\__construct(), ImagesImage_imagemanagerForm\__construct(), Xoops\Form\SelectMatchOption\__construct(), and Xoops\Form\Select\addOptionArray().
Xoops\Form\Select::addOptionArray | ( | $options | ) |
Add multiple options
array | $options | Associative array of value->name pairs |
Definition at line 129 of file Select.php.
References Xoops\Form\Select\$options, and Xoops\Form\Select\addOption().
Referenced by CommentsCommentForm\__construct(), Xoops\Form\SelectTheme\__construct(), Xoops\Form\SelectCountry\__construct(), Xoops\Form\SelectLanguage\__construct(), Xoops\Form\SelectTimeZone\__construct(), Xoops\Form\SelectLocale\__construct(), Xoops\Form\SelectGroup\__construct(), and SystemBlockForm\getForm().
Xoops\Form\Select::getOptgroup | ( | ) |
Get an array with all the optgroup
Definition at line 182 of file Select.php.
References Xoops\Form\Select\$optgroup.
Referenced by Xoops\Form\Select\render().
Xoops\Form\Select::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.
boolean | $encode | encode special characters, potential values: 0 - skip 1 - only for value 2 - for both value and name |
Definition at line 164 of file Select.php.
References $name, Xoops\Form\Select\$options, and Xoops\Form\Select\$value.
Referenced by Xoops\Form\Select\render().
Xoops\Form\Select::getSize | ( | ) |
Get the size
Definition at line 100 of file Select.php.
References Xoops\Html\Attributes\getAttribute().
Xoops\Form\Select::isMultiple | ( | ) |
Are multiple selections allowed?
Definition at line 90 of file Select.php.
References Xoops\Html\Attributes\hasAttribute().
Xoops\Form\Select::render | ( | ) |
Prepare HTML for output
Definition at line 192 of file Select.php.
References Xoops\Html\Attributes\$attributes, Xoops\Form\Element\$extra, $name, Xoops\Form\Select\$value, Xoops\Form\Element\getExtra(), Xoops\Form\Select\getOptgroup(), Xoops\Form\Select\getOptions(), Xoops\Form\Element\getValue(), and Xoops\Form\Element\renderAttributeString().
Xoops\Form\Select::renderValidationJS | ( | ) |
Render custom javascript validation code
Definition at line 235 of file Select.php.
References XoopsLocaleEn_US\F_ENTER, Xoops\Form\Element\getCaption(), Xoops\Form\Element\getName(), and Xoops\Form\Element\isRequired().
|
private |
Definition at line 61 of file Select.php.
Referenced by Xoops\Form\Select\addOptgroup(), and Xoops\Form\Select\getOptgroup().
|
private |
Definition at line 33 of file Select.php.
Referenced by Xoops\Form\Select\addOptionArray(), and Xoops\Form\Select\getOptions().
|
protected |
Definition at line 54 of file Select.php.
Referenced by Xoops\Form\SelectMatchOption\__construct(), Xoops\Form\SelectTheme\__construct(), Xoops\Form\SelectTimeZone\__construct(), Xoops\Form\SelectLocale\__construct(), Xoops\Form\SelectCountry\__construct(), Xoops\Form\SelectLanguage\__construct(), Xoops\Form\SelectGroup\__construct(), Xoops\Form\Select\__construct(), Xoops\Form\Select\addOption(), Xoops\Form\Select\getOptions(), and Xoops\Form\Select\render().