Form/Decorator/Abstract.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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Form  

\Zend_Form_Decorator_Abstract

Package: Zend_Form\Decorator
Zend_Form_Decorator_Abstract
Implements
Children
\Zend_Dojo_Form_Decorator_DijitContainer
\Zend_Form_Decorator_Errors
\Zend_Form_Decorator_Fieldset
\Zend_Form_Decorator_ViewHelper
\Zend_Form_Decorator_FormErrors
\Zend_Form_Decorator_Callback
\Zend_Form_Decorator_Form
\Zend_Form_Decorator_Tooltip
\Zend_Form_Decorator_Label
\Zend_Form_Decorator_File
\Zend_Form_Decorator_Captcha_ReCaptcha
\Zend_Form_Decorator_Captcha_Word
\Zend_Form_Decorator_Image
\Zend_Form_Decorator_Captcha
\Zend_Form_Decorator_Description
\Zend_Form_Decorator_FormElements
\Zend_Form_Decorator_ViewScript
\Zend_Form_Decorator_DtDdWrapper
\Zend_Form_Decorator_HtmlTag
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id$  

Constants

>VConstant  APPEND = 'APPEND'
Placement constants
>VConstant  PREPEND = 'PREPEND'

Properties

>VPropertyprotected\Zend_Form_Element|\Zend_Form $_element
>VPropertyprotectedarray $_options = array()
Decorator options
Default valuearray()Details
Type
array
>VPropertyprotectedstring $_placement = 'APPEND'
Default placement: append
Default value'APPEND'Details
Type
string
>VPropertyprotectedstring $_separator = PHP_EOL
Separator between new content and old
Default valuePHP_EOLDetails
Type
string

Methods

methodpublic__construct(array | \Zend_Config $options = null) : void

Constructor

Parameters
NameTypeDescription
$optionsarray | \Zend_Config
methodpublicclearOptions() : \Zend_Form_Decorator_Abstract

Clear all options

Returns
TypeDescription
\Zend_Form_Decorator_Abstract
methodpublicgetElement() : \Zend_Form_Element | \Zend_Form

Retrieve current element

Returns
TypeDescription
\Zend_Form_Element | \Zend_Form
methodpublicgetOption(string $key) : mixed

Get option

Parameters
NameTypeDescription
$keystring
Returns
TypeDescription
mixed
methodpublicgetOptions() : array

Retrieve options

Returns
TypeDescription
array
methodpublicgetPlacement() : string

Determine if decorator should append or prepend content

Returns
TypeDescription
string
methodpublicgetSeparator() : string

Retrieve separator to use between old and new content

Returns
TypeDescription
string
methodpublicremoveOption(mixed $key) : void

Remove single option

Parameters
NameTypeDescription
$keymixed
methodpublicrender(string $content) : string

Decorate content and/or element

Parameters
NameTypeDescription
$contentstring
Returns
TypeDescription
string
Throws
ExceptionDescription
\Zend_Form_Decorator_Exceptionwhen unimplemented
methodpublicsetConfig(\Zend_Config $config) : \Zend_Form_Decorator_Abstract

Set options from config object

Parameters
NameTypeDescription
$config\Zend_Config
Returns
TypeDescription
\Zend_Form_Decorator_Abstract
methodpublicsetElement(\Zend_Form_Element | \Zend_Form $element) : \Zend_Form_Decorator_Abstract

Set current form element

Parameters
NameTypeDescription
$element\Zend_Form_Element | \Zend_Form
Returns
TypeDescription
\Zend_Form_Decorator_Abstract
Throws
ExceptionDescription
\Zend_Form_Decorator_Exceptionon invalid element type
methodpublicsetOption(string $key, mixed $value) : \Zend_Form_Decorator_Abstract

Set option

Parameters
NameTypeDescription
$keystring
$valuemixed
Returns
TypeDescription
\Zend_Form_Decorator_Abstract
methodpublicsetOptions(array $options) : \Zend_Form_Decorator_Abstract

Set options

Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
\Zend_Form_Decorator_Abstract
Documentation was generated by phpDocumentor 2.2.0 .