API Documentation

Zend/Form/Element/Multi.php

Show: inherited
Table of Contents

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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Form  
Subpackage
Element  

\Zend_Form_Element_Multi

Package: Zend\Form\Element

Base class for multi-option form elements

Parent(s)
\Zend_Form_Element_Xhtml < \Zend_Form_Element
Children
\Zend_Form_Element_MultiCheckbox
\Zend_Form_Element_Radio
\Zend_Form_Element_Select
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id: Multi.php 24594 2012-01-05 21:27:01Z matthew $  

Properties

Propertyprotectedbool  $_registerInArrayValidator= 'true'

Flag: autoregister inArray validator?

Default valuetrueDetails
Type
bool
Propertyprotectedstring  $_separator= ''<br />''

Separator to use between options; defaults to '<br />'.

Default value'<br />'Details
Type
string
Propertyprotectedarray  $_translated= 'array()'

Which values are translated already?

Default valuearray()Details
Type
array
Propertypublicarray  $options= 'array()'

Array of options for multi-item

Default valuearray()Details
Type
array

Methods

methodprotected_getMultiOptions( ) : array

Retrieve options array

Returns
Type Description
array
methodprotected_translateOption( string $option, string $value ) : bool

Translate an option

Parameters
Name Type Description
$option string
$value string
Returns
Type Description
bool
methodprotected_translateValue( string $value ) : string

Translate a multi option value

Parameters
Name Type Description
$value string
Returns
Type Description
string
methodpublicaddMultiOption( string $option, string $value = '' ) : \Zend_Form_Element_Multi

Add an option

Parameters
Name Type Description
$option string
$value string
Returns
Type Description
\Zend_Form_Element_Multi
methodpublicaddMultiOptions( array $options ) : \Zend_Form_Element_Multi

Add many options at once

Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Form_Element_Multi
methodpublicclearMultiOptions( ) : \Zend_Form_Element_Multi

Clear all options

Returns
Type Description
\Zend_Form_Element_Multi
methodpublicgetMultiOption( string $option ) : mixed

Retrieve single multi option

Parameters
Name Type Description
$option string
Returns
Type Description
mixed
methodpublicgetMultiOptions( ) : array

Retrieve options

Returns
Type Description
array
methodpublicgetSeparator( ) : mixed

Retrieve separator

Returns
Type Description
mixed
methodpublicisValid( string $value, mixed $context = null ) : bool

Is the value provided valid?

Autoregisters InArray validator if necessary.

Parameters
Name Type Description
$value string
$context mixed
Returns
Type Description
bool
methodpublicregisterInArrayValidator( ) : bool

Get status of auto-register inArray validator flag

Returns
Type Description
bool
methodpublicremoveMultiOption( string $option ) : bool

Remove a single multi option

Parameters
Name Type Description
$option string
Returns
Type Description
bool
methodpublicsetMultiOptions( array $options ) : \Zend_Form_Element_Multi

Set all options at once (overwrites)

Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Form_Element_Multi
methodpublicsetRegisterInArrayValidator( bool $flag ) : \Zend_Form_Element_Multi

Set flag indicating whether or not to auto-register inArray validator

Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element_Multi
methodpublicsetSeparator( mixed $separator ) : \Zend_Form_Element_Multi

Set separator

Parameters
Name Type Description
$separator mixed
Returns
Type Description
\Zend_Form_Element_Multi
Details
Fluent
This method is part of a fluent interface and will return the same instance  
Documentation was generated by DocBlox 0.15.1.