API Documentation

Form/Decorator/Label.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
subpackage
Decorator
Classes
Zend_Form_Decorator_Label

Description

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.

Zend_Form_Decorator_Label

Extends from
Zend_Form_Decorator_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Form
subpackage
Decorator
version
$Id: Label.php 22129 2010-05-06 11:20:39Z alab $
Properties
$_placement
$_tag
Methods
setId
getId
setTag
getTag
getClass
_loadOptReqKey
__call
getLabel
render

Description

Zend_Form_Decorator_Label

Accepts the options: - separator: separator to use between label and content (defaults to PHP_EOL) - placement: whether to append or prepend label to content (defaults to prepend) - tag: if set, used to wrap the label in an additional HTML tag - opt(ional)Prefix: a prefix to the label to use when the element is optional - opt(iona)lSuffix: a suffix to the label to use when the element is optional - req(uired)Prefix: a prefix to the label to use when the element is required - req(uired)Suffix: a suffix to the label to use when the element is required

Any other options passed will be used as HTML attributes of the label tag.

Properties

$_placement

string $_placement = 'PREPEND'

Default placement: prepend

Details

$_placement
string
visibility
protected
default
PREPEND
final
false
static
false

$_tag

string $_tag = ''

HTML tag with which to surround label

Details

$_tag
string
visibility
protected
default
final
false
static
false

Methods

__call

__call( string $method, array $args ) : mixed

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()
Arguments
$method
string
$args
array
Output
mixed
Details
visibility
public
final
false
static
false
throws
for unsupported methods

_loadOptReqKey

_loadOptReqKey( string $key ) : void

Load an optional/required suffix/prefix key

Arguments
$key
string
Details
visibility
protected
final
false
static
false

getClass

getClass( ) : string

Get class with which to define label

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

Output
string
Details
visibility
public
final
false
static
false

getId

getId( ) : string

Retrieve element ID (used in 'for' attribute)

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

Output
string
Details
visibility
public
final
false
static
false

getLabel

getLabel( ) : void

Get label to render

Details
visibility
public
final
false
static
false

getTag

getTag( ) : void

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

Details
visibility
public
final
false
static
false

render

render( string $content ) : string

Render a label

Arguments
$content
string
Output
string
Details
visibility
public
final
false
static
false

setId

setId( string $id ) : Zend_Form_Decorator_Label

Set element ID

Arguments
$id
string
Details
visibility
public
final
false
static
false

setTag

setTag( string $tag ) : Zend_Form_Decorator_Label

Set HTML tag with which to surround label

Arguments
$tag
string
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.