Form/Element/Checkbox.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to license@zend.com so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Form
- Subpackage
- Element
\Zend_Form_Element_Checkbox
Package: Zend_Form\Element



Returns


Returns
Checkbox form element
- Parent(s)
- \Zend_Form_Element_Xhtml < \Zend_Form_Element
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Version
- $Id$
Properties


string $helper = 'formCheckbox'
Use formCheckbox view helper by default
Default value
'formCheckbox'
Details- Type
- string
Methods


setChecked(bool $flag) : \Zend_Form_Element_Checkbox
Set checked flag
Parameters
Returns
Name | Type | Description |
---|---|---|
$flag | bool |
Type | Description |
---|---|
\Zend_Form_Element_Checkbox |


setCheckedValue(string $value) : \Zend_Form_Element_Checkbox
Set checked value
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
\Zend_Form_Element_Checkbox |


setOptions(array $options) : \Zend_Form_Element_Checkbox
Set options
Intercept checked and unchecked values and set them early; test stored
value against checked and unchecked values after configuration.
ParametersName | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
\Zend_Form_Element_Checkbox |


setUncheckedValue(string $value) : \Zend_Form_Element_Checkbox
Set unchecked value
Parameters
Returns
Name | Type | Description |
---|---|---|
$value | string |
Type | Description |
---|---|
\Zend_Form_Element_Checkbox |


setValue(mixed $value) : \Zend_Form_Element_Checkbox
Set value
If value matches checked value, sets to that value, and sets the checked
flag to true.
Any other value causes the unchecked value to be set as the current
value, and the checked flag to be set as false.
ParametersName | Type | Description |
---|---|---|
$value | mixed |
Type | Description |
---|---|
\Zend_Form_Element_Checkbox |