View/Helper/FormElement.php

Show: PublicProtectedPrivateinherited
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_View  
Subpackage
Helper  
Version
$Id: FormElement.php 24823 2012-05-29 19:52:12Z rob $  

\Zend_View_Helper_FormElement

Package: Zend\View\Helper
Base helper for form elements.

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

Parent(s)
\Zend_View_Helper_HtmlElement < \Zend_View_Helper_Abstract
Children
\Zend_View_Helper_Fieldset
\Zend_View_Helper_FormSelect
\Zend_View_Helper_FormErrors
\Zend_View_Helper_FormNote
\Zend_View_Helper_FormText
\Zend_View_Helper_HtmlList
\Zend_View_Helper_Form
\Zend_View_Helper_FormReset
\Zend_View_Helper_FormButton
\Zend_View_Helper_FormSubmit
\Zend_View_Helper_FormImage
\Zend_View_Helper_FormHidden
\Zend_View_Helper_FormCheckbox
\Zend_View_Helper_FormPassword
\Zend_View_Helper_FormTextarea
\Zend_View_Helper_FormLabel
\Zend_View_Helper_FormRadio
\Zend_View_Helper_FormFile
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  EOL = "\n"
inherited
EOL character
Inherited from: \Zend_View_Helper_HtmlElement::EOL

Properties

>VPropertyprotectedstring $_closingBracket = null
inherited
The tag closing bracket
Inherited from: \Zend_View_Helper_HtmlElement::$$_closingBracket
Default valuenullDetails
Type
string
Inherited_from
\Zend_View_Helper_HtmlElement::$$_closingBracket  
>VPropertyprotected\Zend_Translate_Adapter|null $_translator
Details
Type
\Zend_Translate_Adapter | null
>VPropertypublic\Zend_View_Interface $view = null
Default valuenullDetails
Type
\Zend_View_Interface
Inherited_from
\Zend_View_Helper_Abstract::$$view  
Inherited_from
\Zend_View_Helper_HtmlElement::$$view  

Methods

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

Converts parameter arguments to an element info array.

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
NameTypeDescription
$name
$value
$attribs
$options
$listsep
Returns
TypeDescription
arrayAn 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

Creates a hidden element.

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

Parameters
NameTypeDescription
$namestring

The element name.

$valuestring

The element value.

$attribsarray

Attributes for the element.

Returns
TypeDescription
stringA hidden element.
Details
Access
protected  
methodprotected_htmlAttribs(array $attribs) : string
inherited

Converts an associative array to a string of tag attributes.

Inherited from: \Zend_View_Helper_HtmlElement::_htmlAttribs()
Parameters
NameTypeDescription
$attribsarray

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

Returns
TypeDescription
stringThe XHTML for the attributes.
Details
Access
public  
methodprotected_isStrictDoctype() : boolean
inherited

Is doctype strict?

Inherited from: \Zend_View_Helper_HtmlElement::_isStrictDoctype()
Returns
TypeDescription
boolean
methodprotected_isXhtml() : boolean
inherited

Is doctype XHTML?

Inherited from: \Zend_View_Helper_HtmlElement::_isXhtml()
Returns
TypeDescription
boolean
methodprotected_normalizeId(string $value) : string
inherited

Normalize an ID

Inherited from: \Zend_View_Helper_HtmlElement::_normalizeId()
Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
string
methodpublicdirect() : void
inherited

Strategy pattern: currently unutilized

Inherited from: \Zend_View_Helper_Abstract::direct()\Zend_View_Helper_HtmlElement::direct()
methodpublicgetClosingBracket() : string
inherited

Get the tag closing bracket

Inherited from: \Zend_View_Helper_HtmlElement::getClosingBracket()
Returns
TypeDescription
string
methodpublicgetTranslator() : \Zend_Translate_Adapter | null

Get translator

Returns
TypeDescription
\Zend_Translate_Adapter | null
methodpublicsetTranslator(\Zend_Translate | \Zend_Translate_Adapter | null $translator = null) : \Zend_View_Helper_FormElement

Set translator

Parameters
NameTypeDescription
$translator\Zend_Translate | \Zend_Translate_Adapter | null
Returns
TypeDescription
\Zend_View_Helper_FormElement
methodpublicsetView(\Zend_View_Interface $view) : \Zend_View_Helper_Abstract
Parameters
NameTypeDescription
$view\Zend_View_Interface
Returns
TypeDescription
\Zend_View_Helper_Abstract
Documentation was generated by phpDocumentor 2.0.0a12.