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
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.

string
$_placement= ''PREPEND''
Default placement: prepend
'PREPEND'
Details
__call(
string $method, array $args
)
:
mixed
Overloading
Currently overloads:
Name | Type | Description |
---|---|---|
$method | string | |
$args | array |
Type | Description |
---|---|
mixed |
Exception | Description |
---|---|
\Zend_Form_Exception | for unsupported methods |

_loadOptReqKey(
string $key
)
:
void
Load an optional/required suffix/prefix key
Name | Type | Description |
---|---|---|
$key | string |

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.
Type | Description |
---|---|
string |

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.
Type | Description |
---|---|
string |

render(
string $content
)
:
string
Render a label
Name | Type | Description |
---|---|---|
$content | string |
Type | Description |
---|---|
string |

setTagClass(
string $tagClass
)
:
\Zend_Form_Decorator_Label
Set the class to apply to the HTML tag with which to surround label
Name | Type | Description |
---|---|---|
$tagClass | string |
Type | Description |
---|---|
\Zend_Form_Decorator_Label |