View/Helper/FormMultiCheckbox.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 [email protected] 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_View  
Subpackage
Helper  
Version
$Id: FormMultiCheckbox.php 24593 2012-01-05 20:35:02Z matthew $  

\Zend_View_Helper_FormMultiCheckbox

Package: Zend\View\Helper

Helper to generate a set of checkbox button elements

Extend this, don't use it on its own.

Parent(s)
\Zend_View_Helper_FormRadio < \Zend_View_Helper_FormElement < \Zend_View_Helper_HtmlElement < \Zend_View_Helper_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Properties

Propertyprotectedstring $_inputType = 'checkbox'

Input type to use

Default value'checkbox'Details
Type
string
Propertyprotectedbool $_isArray = true

Whether or not this element represents an array collection by default

Default valuetrueDetails
Type
bool
Propertyprotected\Zend_Translate_Adapter|null $_translator =

Methods

methodprotected_getInfo( $name,  $value = null,  $attribs = null,  $options = null,  $listsep = null) : array
inherited

Converts parameter arguments to an element info array.

Inherited from: \Zend_View_Helper_FormElement::_getInfo()\Zend_View_Helper_FormRadio::_getInfo()

E.g, formExample($name, $value, $attribs, $options, $listsep) is the same thing as formExample(array('name' => ...)).

Note that you cannot pass a 'disable' param; you need to pass it as an 'attribs' key.

Parameters
Name Type Description
$name
$value
$attribs
$options
$listsep
Returns
Type Description
array An element info array with keys for name, value, attribs, options, listsep, disable, and escape.
Details
Access
protected  
methodprotected_hidden(string $name, string $value = null, array $attribs = null) : string
inherited

Creates a hidden element.

Inherited from: \Zend_View_Helper_FormElement::_hidden()\Zend_View_Helper_FormRadio::_hidden()

We have this as a common method because other elements often need hidden elements for their operation.

Parameters
Name Type Description
$name string

The element name.

$value string

The element value.

$attribs array

Attributes for the element.

Returns
Type Description
string A hidden element.
Details
Access
protected  
methodprotected_htmlAttribs(array $attribs) : string
Parameters
Name Type Description
$attribs array

From this array, each key-value pair is converted to an attribute name and value.

Returns
Type Description
string The XHTML for the attributes.
Details
Access
public  
methodprotected_isStrictDoctype() : boolean
Returns
Type Description
boolean
methodprotected_isXhtml() : boolean
Returns
Type Description
boolean
methodprotected_normalizeId(string $value) : string
Parameters
Name Type Description
$value string
Returns
Type Description
string
methodpublicformMultiCheckbox(string | array $name, mixed $value = null, array | string $attribs = null, array $options = null,  $listsep = "
\n")
: string

Generates a set of checkbox button elements.

Parameters
Name Type Description
$name string | array

If a string, the element name. If an array, all other parameters are ignored, and the array elements are extracted in place of added parameters.

$value mixed

The checkbox value to mark as 'checked'.

$attribs array | string

Attributes added to each radio.

$options array

An array of key-value pairs where the array key is the checkbox value, and the array value is the radio text.

$listsep
Returns
Type Description
string The radio buttons XHTML.
Details
Access
public  
methodpublicformRadio(string | array $name, mixed $value = null, array | string $attribs = null, array $options = null,  $listsep = "
\n")
: string
inherited

Generates a set of radio button elements.

Inherited from: \Zend_View_Helper_FormRadio::formRadio()
Parameters
Name Type Description
$name string | array

If a string, the element name. If an array, all other parameters are ignored, and the array elements are extracted in place of added parameters.

$value mixed

The radio value to mark as 'checked'.

$attribs array | string

Attributes added to each radio.

$options array

An array of key-value pairs where the array key is the radio value, and the array value is the radio text.

$listsep
Returns
Type Description
string The radio buttons XHTML.
Details
Access
public  
methodpublicgetClosingBracket() : string
Returns
Type Description
string
methodpublicgetTranslator() : \Zend_Translate_Adapter | null
Returns
Type Description
\Zend_Translate_Adapter | null
methodpublicsetTranslator(\Zend_Translate | \Zend_Translate_Adapter | null $translator = null) : \Zend_View_Helper_FormElement
Parameters
Name Type Description
$translator \Zend_Translate | \Zend_Translate_Adapter | null
Returns
Type Description
\Zend_View_Helper_FormElement
Documentation was generated by phpDocumentor 2.0.0a8.