Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Form_Decorator_Label Class Reference

Public Member Functions

 setId ($id)
 Set element ID.
 
 getId ()
 Retrieve element ID (used in 'for' attribute)
 
 setTag ($tag)
 Set HTML tag with which to surround label.
 
 getTag ()
 Get HTML tag, if any, with which to surround label.
 
 setTagClass ($tagClass)
 Set the class to apply to the HTML tag with which to surround label.
 
 getTagClass ()
 Get the class to apply to the HTML tag, if any, with which to surround label.
 
 getClass ()
 Get class with which to define label.
 
 __call ($method, $args)
 Overloading.
 
 getLabel ()
 Get label to render.
 
 getPlacement ()
 Determine if label should append, prepend or implicit content.
 
 render ($content)
 Render a label.
 
- Public Member Functions inherited from Zend_Form_Decorator_Abstract
 __construct ($options=null)
 Constructor.
 
 setOptions (array $options)
 Set options.
 
 setConfig (Zend_Config $config)
 Set options from config object.
 
 setOption ($key, $value)
 Set option.
 
 getOption ($key)
 Get option.
 
 getOptions ()
 Retrieve options.
 
 removeOption ($key)
 Remove single option.
 
 clearOptions ()
 Clear all options.
 
 setElement ($element)
 Set current form element.
 
 getElement ()
 Retrieve current element.
 
 getPlacement ()
 Determine if decorator should append or prepend content.
 
 getSeparator ()
 Retrieve separator to use between old and new content.
 
 render ($content)
 Decorate content and/or element.
 

Public Attributes

const IMPLICIT = 'IMPLICIT'
 Placement constants.
 
const IMPLICIT_PREPEND = 'IMPLICIT_PREPEND'
 
const IMPLICIT_APPEND = 'IMPLICIT_APPEND'
 
- Public Attributes inherited from Zend_Form_Decorator_Abstract
const APPEND = 'APPEND'
 Placement constants.
 
const PREPEND = 'PREPEND'
 

Protected Member Functions

 _loadOptReqKey ($key)
 Load an optional/required suffix/prefix key.
 

Protected Attributes

 $_placement = 'PREPEND'
 
 $_tag
 
 $_tagClass
 
- Protected Attributes inherited from Zend_Form_Decorator_Abstract
 $_placement = 'APPEND'
 
 $_element
 
 $_options = array()
 
 $_separator = PHP_EOL
 

Member Function Documentation

__call (   $method,
  $args 
)

Overloading.

Currently overloads:

  • getOpt(ional)Prefix()
  • getOpt(ional)Suffix()
  • getReq(uired)Prefix()
  • getReq(uired)Suffix()
  • setOpt(ional)Prefix()
  • setOpt(ional)Suffix()
  • setReq(uired)Prefix()
  • setReq(uired)Suffix()
Parameters
string$method
array$args
Returns
mixed
Exceptions
Zend_Form_Exceptionfor unsupported methods
_loadOptReqKey (   $key)
protected

Load an optional/required suffix/prefix key.

Parameters
string$key
Returns
void
getClass ( )

Get class with which to define label.

Appends either 'optional' or 'required' to class, depending on whether or not the element is required.

Returns
string
getId ( )

Retrieve element ID (used in 'for' attribute)

If none set in decorator, looks first for element 'id' attribute, and defaults to element name.

Returns
string
getLabel ( )

Get label to render.

Returns
string
getPlacement ( )

Determine if label should append, prepend or implicit content.

Returns
string
getTag ( )

Get HTML tag, if any, with which to surround label.

Returns
string
getTagClass ( )

Get the class to apply to the HTML tag, if any, with which to surround label.

Returns
void
render (   $content)

Render a label.

Parameters
string$content
Returns
string

Implements Zend_Form_Decorator_Interface.

setId (   $id)

Set element ID.

Parameters
string$id
Returns
Zend_Form_Decorator_Label
setTag (   $tag)

Set HTML tag with which to surround label.

Parameters
string$tag
Returns
Zend_Form_Decorator_Label
setTagClass (   $tagClass)

Set the class to apply to the HTML tag with which to surround label.

Parameters
string$tagClass
Returns
Zend_Form_Decorator_Label

Member Data Documentation

$_placement = 'PREPEND'
protected
$_tag
protected
$_tagClass
protected
const IMPLICIT = 'IMPLICIT'

Placement constants.

const IMPLICIT_APPEND = 'IMPLICIT_APPEND'
const IMPLICIT_PREPEND = 'IMPLICIT_PREPEND'