Field representation of a select field in HTML.
Methods
Constructs a selection box.
__construct(string $name, $label, array $options, array $attributes)
Parameters
$name
string
$label
$options
array
$attributes
array
Retrieve the value of an attribute.
__get(string $attribute) : string
Inherited
| inherited_from |
\WebLab_Form_Field::__get() |
Parameters
$attribute
string
Returns
string
Check if an attribute has been set.
__isset(string $attribute) : boolean
Inherited
| inherited_from |
\WebLab_Form_Field::__isset() |
Parameters
$attribute
string
Returns
boolean
Set the value of an attribute.
__set(string $attribute, string $value) : \WebLab_Form_Field
Inherited
| inherited_from |
\WebLab_Form_Field::__set() |
Parameters
$attribute
string
$value
string
Returns
(non-PHPdoc)
__toString() : string
Add a validation filter
addFilter(\WebLab_Filter $filter, \unknown_type $errorMessage)
Inherited
| inherited_from |
\WebLab_Form_Field::addFilter() |
Parameters
$errorMessage
\unknown_type
Add an option to the selection box.
addOption(string $text, string $value) : \WebLab_Form_Select
Parameters
$text
string
$value
string
Returns
Shorthand for setAttribute and getAttribute
attr(string $name, string $value) : string
Inherited
| inherited_from |
\WebLab_Form_Field::attr() |
Parameters
$name
string
$value
string
Returns
string
Retrieve the value of an attribute.
getAttribute(string $attribute) : string
Inherited
| inherited_from |
\WebLab_Form_Field::getAttribute() |
Parameters
$attribute
string
Returns
string
Return the label of this field.
getLabel() : string
Inherited
| inherited_from |
\WebLab_Form_Field::getLabel() |
Returns
string
(non-PHPdoc)
getValue() : string
Determine if field is correct.
isValid() : boolean | array
Inherited
| inherited_from |
\WebLab_Form_Field::isValid() |
Returns
booleanarray
Remote an option from the select box.
removeOption(string $text, string $value) : \WebLab_Form_Select
Parameters
$text
string
$value
string
Returns
Set the value of an attribute.
setAttribute(string $attribute, string $value) : \WebLab_Form_Field
Inherited
| inherited_from |
\WebLab_Form_Field::setAttribute() |
Parameters
$attribute
string
$value
string
Returns
Set the label of this field.
setLabel(string $label)
Inherited
| inherited_from |
\WebLab_Form_Field::setLabel() |
Parameters
$label
string
(non-PHPdoc)
setValue(string $value) : \WebLab_Form_Field
Parameters
$value
string
Returns
Properties
$_attributes : array
Inherited
| inherited_from |
\WebLab_Form_Field::$$_attributes |
$_filters : array
Inherited
| inherited_from |
\WebLab_Form_Field::$$_filters |
$_label : string
Inherited
| inherited_from |
\WebLab_Form_Field::$$_label |