API Documentation

Form/Element/Checkbox.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
subpackage
Element
Classes
Zend_Form_Element_Checkbox

Description

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.

Zend_Form_Element_Checkbox

Extends from
Zend_Form_Element_Xhtml
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
subpackage
Element
version
$Id: Checkbox.php 20096 2010-01-06 02:05:09Z bkarwin $
Properties
$checked
$helper
$options
$_checkedValue
$_uncheckedValue
$_value
Methods
setOptions
setValue
setCheckedValue
getCheckedValue
setUncheckedValue
getUncheckedValue
setChecked
isChecked

Description

Checkbox form element

Properties

$_checkedValue

string $_checkedValue = '1'

Value when checked

Details

$_checkedValue
string
visibility
protected
default
1
final
false
static
false

$_uncheckedValue

string $_uncheckedValue = '0'

Value when not checked

Details

$_uncheckedValue
string
visibility
protected
default
0
final
false
static
false

$_value

string $_value = '0'

Current value

Details

$_value
string
0 or 1
visibility
protected
default
0
final
false
static
false

$checked

bool $checked = 'false'

Is the checkbox checked?

Details

$checked
bool
visibility
public
default
false
final
false
static
false

$helper

string $helper = 'formCheckbox'

Use formCheckbox view helper by default

Details

$helper
string
visibility
public
default
formCheckbox
final
false
static
false

$options

array $options = 'array'

Options that will be passed to the view helper

Details

$options
array
visibility
public
default
array
final
false
static
false

Methods

getCheckedValue

getCheckedValue( ) : string

Get value when checked

Output
string
Details
visibility
public
final
false
static
false

getUncheckedValue

getUncheckedValue( ) : string

Get value when not checked

Output
string
Details
visibility
public
final
false
static
false

isChecked

isChecked( ) : bool

Get checked flag

Output
bool
Details
visibility
public
final
false
static
false

setChecked

setChecked( bool $flag ) : Zend_Form_Element_Checkbox

Set checked flag

Arguments
$flag
bool
Details
visibility
public
final
false
static
false

setCheckedValue

setCheckedValue( string $value ) : Zend_Form_Element_Checkbox

Set checked value

Arguments
$value
string
Details
visibility
public
final
false
static
false

setOptions

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.

Arguments
$options
array
Details
visibility
public
final
false
static
false

setUncheckedValue

setUncheckedValue( string $value ) : Zend_Form_Element_Checkbox

Set unchecked value

Arguments
$value
string
Details
visibility
public
final
false
static
false

setValue

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.

Arguments
$value
mixed
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.