Methods

__construct()

__construct(null | int | string $name, array $options) 
Inherited

inherited_from \Zend\Form\Element::__construct()
inherited_from \Zend\Form\Element\Checkbox::__construct()
inherited_from \Zend\Form\Element\MultiCheckbox::__construct()

Parameters

$name

nullintstring

Optional name for the element

$options

array

Optional options for the element

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Clear all attributes

clearAttributes() : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::clearAttributes()
inherited_from \Zend\Form\Element\Checkbox::clearAttributes()
inherited_from \Zend\Form\Element\MultiCheckbox::clearAttributes()

Returns

Retrieve a single element attribute

getAttribute($key) : mixed | null
Inherited

inherited_from \Zend\Form\Element::getAttribute()
inherited_from \Zend\Form\Element\Checkbox::getAttribute()
inherited_from \Zend\Form\Element\MultiCheckbox::getAttribute()

Parameters

$key

Returns

mixednull

Retrieve all attributes at once

getAttributes() : array | \Traversable
Inherited

inherited_from \Zend\Form\Element::getAttributes()
inherited_from \Zend\Form\Element\Checkbox::getAttributes()
inherited_from \Zend\Form\Element\MultiCheckbox::getAttributes()

Returns

array\Traversable

Get the value to use when checkbox is checked

getCheckedValue() : string
Inherited

inherited_from \Zend\Form\Element\Checkbox::getCheckedValue()
inherited_from \Zend\Form\Element\MultiCheckbox::getCheckedValue()

Returns

string

Provide default input rules for this element

getInputSpecification() : array
Inherited

Attaches the captcha as a validator.

inherited_from \Zend\Form\Element\Checkbox::getInputSpecification()
inherited_from \Zend\Form\Element\MultiCheckbox::getInputSpecification()

Returns

array

Retrieve the label used for this element

getLabel() : string
Inherited

inherited_from \Zend\Form\Element::getLabel()
inherited_from \Zend\Form\Element\Checkbox::getLabel()
inherited_from \Zend\Form\Element\MultiCheckbox::getLabel()

Returns

string

Get the attributes to use with the label

getLabelAttributes() : array
Inherited

inherited_from \Zend\Form\Element::getLabelAttributes()
inherited_from \Zend\Form\Element\Checkbox::getLabelAttributes()
inherited_from \Zend\Form\Element\MultiCheckbox::getLabelAttributes()

Returns

array

Get validation error messages, if any.

getMessages() : array | \Traversable
Inherited

Returns a list of validation failure messages, if any.

inherited_from \Zend\Form\Element::getMessages()
inherited_from \Zend\Form\Element\Checkbox::getMessages()
inherited_from \Zend\Form\Element\MultiCheckbox::getMessages()

Returns

array\Traversable

Get value for name

getName() : string | int
Inherited

inherited_from \Zend\Form\Element::getName()
inherited_from \Zend\Form\Element\Checkbox::getName()
inherited_from \Zend\Form\Element\MultiCheckbox::getName()

Returns

stringint

Return the specified option

getOption(string $option) : NULL | mixed
Inherited

inherited_from \Zend\Form\Element::getOption()
inherited_from \Zend\Form\Element\Checkbox::getOption()
inherited_from \Zend\Form\Element\MultiCheckbox::getOption()

Parameters

$option

string

Returns

NULLmixed

Get defined options

getOptions() : array
Inherited

inherited_from \Zend\Form\Element::getOptions()
inherited_from \Zend\Form\Element\Checkbox::getOptions()
inherited_from \Zend\Form\Element\MultiCheckbox::getOptions()

Returns

array

Get the value to use when checkbox is unchecked

getUncheckedValue() : string
Inherited

inherited_from \Zend\Form\Element\Checkbox::getUncheckedValue()
inherited_from \Zend\Form\Element\MultiCheckbox::getUncheckedValue()

Returns

string

Retrieve the element value

getValue() : mixed
Inherited

inherited_from \Zend\Form\Element::getValue()
inherited_from \Zend\Form\Element\Checkbox::getValue()
inherited_from \Zend\Form\Element\MultiCheckbox::getValue()

Returns

mixed

getValueOptions()

getValueOptions() : array
Inherited

inherited_from \Zend\Form\Element\MultiCheckbox::getValueOptions()

Returns

array

Does the element has a specific attribute ?

hasAttribute(string $key) : bool
Inherited

inherited_from \Zend\Form\Element::hasAttribute()
inherited_from \Zend\Form\Element\Checkbox::hasAttribute()
inherited_from \Zend\Form\Element\MultiCheckbox::hasAttribute()

Parameters

$key

string

Returns

bool

This function is automatically called when creating element with factory.

init() : void
Inherited

It allows to perform various operations (add elements...)

inherited_from \Zend\Form\Element::init()
inherited_from \Zend\Form\Element\Checkbox::init()
inherited_from \Zend\Form\Element\MultiCheckbox::init()

Checks if this checkbox is checked.

isChecked() : bool
Inherited

inherited_from \Zend\Form\Element\Checkbox::isChecked()
inherited_from \Zend\Form\Element\MultiCheckbox::isChecked()

Returns

bool

Remove a single attribute

removeAttribute(string $key) : \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::removeAttribute()
inherited_from \Zend\Form\Element\Checkbox::removeAttribute()
inherited_from \Zend\Form\Element\MultiCheckbox::removeAttribute()

Parameters

$key

string

Returns

Remove many attributes at once

removeAttributes(array $keys) : \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::removeAttributes()
inherited_from \Zend\Form\Element\Checkbox::removeAttributes()
inherited_from \Zend\Form\Element\MultiCheckbox::removeAttributes()

Parameters

$keys

array

Returns

Set a single element attribute

setAttribute(string $key, mixed $value) : \Zend\Form\Element\MultiCheckbox | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element\MultiCheckbox::setAttribute()

Parameters

$key

string

$value

mixed

Returns

Set many attributes at once

setAttributes(array | \Traversable $arrayOrTraversable) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

Implementation will decide if this will overwrite or merge.

inherited_from \Zend\Form\Element::setAttributes()
inherited_from \Zend\Form\Element\Checkbox::setAttributes()
inherited_from \Zend\Form\Element\MultiCheckbox::setAttributes()

Parameters

$arrayOrTraversable

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Checks or unchecks the checkbox.

setChecked(bool $value) : \Zend\Form\Element\Checkbox
Inherited

inherited_from \Zend\Form\Element\Checkbox::setChecked()
inherited_from \Zend\Form\Element\MultiCheckbox::setChecked()

Parameters

$value

bool

The flag to set.

Returns

Set the value to use when checkbox is checked

setCheckedValue($checkedValue) : \Zend\Form\Element\Checkbox
Inherited

inherited_from \Zend\Form\Element\Checkbox::setCheckedValue()
inherited_from \Zend\Form\Element\MultiCheckbox::setCheckedValue()

Parameters

$checkedValue

Returns

Set the label used for this element

setLabel($label) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setLabel()
inherited_from \Zend\Form\Element\Checkbox::setLabel()
inherited_from \Zend\Form\Element\MultiCheckbox::setLabel()

Parameters

$label

Returns

Set the attributes to use with the label

setLabelAttributes(array $labelAttributes) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setLabelAttributes()
inherited_from \Zend\Form\Element\Checkbox::setLabelAttributes()
inherited_from \Zend\Form\Element\MultiCheckbox::setLabelAttributes()

Parameters

$labelAttributes

array

Returns

Set a list of messages to report when validation fails

setMessages(array | \Traversable $messages) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

inherited_from \Zend\Form\Element::setMessages()
inherited_from \Zend\Form\Element\Checkbox::setMessages()
inherited_from \Zend\Form\Element\MultiCheckbox::setMessages()

Parameters

$messages

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Set value for name

setName(string $name) : \Zend\Form\Element | \Zend\Form\ElementInterface
Inherited

In most cases, this will proxy to the attributes for storage, but is present to indicate that elements are generally named.

inherited_from \Zend\Form\Element::setName()
inherited_from \Zend\Form\Element\Checkbox::setName()
inherited_from \Zend\Form\Element\MultiCheckbox::setName()

Parameters

$name

string

Returns

Set options for an element.

setOptions(array | \Traversable $options) : \Zend\Form\Element\MultiCheckbox | \Zend\Form\ElementInterface
Inherited

Accepted options are: - label: label to associate with the element - label_attributes: attributes to use when the label is rendered - value_options: list of values and labels for the select options

inherited_from \Zend\Form\Element\MultiCheckbox::setOptions()

Parameters

$options

array\Traversable

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

Set the value to use when checkbox is unchecked

setUncheckedValue($uncheckedValue) : \Zend\Form\Element\Checkbox
Inherited

inherited_from \Zend\Form\Element\Checkbox::setUncheckedValue()
inherited_from \Zend\Form\Element\MultiCheckbox::setUncheckedValue()

Parameters

$uncheckedValue

Returns

Do we render hidden element?

setUseHiddenElement(bool $useHiddenElement) : \Zend\Form\Element\Checkbox
Inherited

inherited_from \Zend\Form\Element\Checkbox::setUseHiddenElement()
inherited_from \Zend\Form\Element\MultiCheckbox::setUseHiddenElement()

Parameters

$useHiddenElement

bool

Returns

Sets the value that should be selected.

setValue(mixed $value) : \Zend\Form\Element\MultiCheckbox
Inherited

inherited_from \Zend\Form\Element\MultiCheckbox::setValue()

Parameters

$value

mixed

The value to set.

Returns

setValueOptions()

setValueOptions(array $options) : \Zend\Form\Element\MultiCheckbox
Inherited

inherited_from \Zend\Form\Element\MultiCheckbox::setValueOptions()

Parameters

$options

array

Returns

Do we render hidden element?

useHiddenElement() : bool
Inherited

inherited_from \Zend\Form\Element\Checkbox::useHiddenElement()
inherited_from \Zend\Form\Element\MultiCheckbox::useHiddenElement()

Returns

bool

Get only the values from the options attribute

getValueOptionsValues() : array
Inherited

inherited_from \Zend\Form\Element\MultiCheckbox::getValueOptionsValues()

Returns

array

 Properties

 

Seed attributes

$attributes : array

 

$checkedValue

$checkedValue : string
Inherited

inherited_from \Zend\Form\Element\Checkbox::$$checkedValue
inherited_from \Zend\Form\Element\MultiCheckbox::$$checkedValue
 

$label

$label : string
Inherited

inherited_from \Zend\Form\Element::$$label
inherited_from \Zend\Form\Element\Checkbox::$$label
inherited_from \Zend\Form\Element\MultiCheckbox::$$label
 

$labelAttributes

$labelAttributes : array
Inherited

inherited_from \Zend\Form\Element::$$labelAttributes
inherited_from \Zend\Form\Element\Checkbox::$$labelAttributes
inherited_from \Zend\Form\Element\MultiCheckbox::$$labelAttributes
 

<p>Validation error messages</p>

$messages : array
Inherited

inherited_from \Zend\Form\Element::$$messages
inherited_from \Zend\Form\Element\Checkbox::$$messages
inherited_from \Zend\Form\Element\MultiCheckbox::$$messages
 

<p>custom options</p>

$options : array
Inherited

inherited_from \Zend\Form\Element::$$options
inherited_from \Zend\Form\Element\Checkbox::$$options
inherited_from \Zend\Form\Element\MultiCheckbox::$$options
 

$uncheckedValue

$uncheckedValue : string
Inherited

inherited_from \Zend\Form\Element\MultiCheckbox::$$uncheckedValue
 

$useHiddenElement

$useHiddenElement : bool
Inherited

inherited_from \Zend\Form\Element\MultiCheckbox::$$useHiddenElement
 

$validator

$validator : \Zend\Validator\ValidatorInterface
Inherited

inherited_from \Zend\Form\Element\Checkbox::$$validator
inherited_from \Zend\Form\Element\MultiCheckbox::$$validator
 

$value

$value : mixed
Inherited

inherited_from \Zend\Form\Element::$$value
inherited_from \Zend\Form\Element\Checkbox::$$value
inherited_from \Zend\Form\Element\MultiCheckbox::$$value
 

$valueOptions

$valueOptions : array
Inherited

inherited_from \Zend\Form\Element\MultiCheckbox::$$valueOptions