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
string $_tag = ''
HTML tag with which to surround label
__call(
string $method, array $args
)
:
mixed
Overloading
Currently overloads:
_loadOptReqKey(
string $key
)
:
void
Load an optional/required suffix/prefix key
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.
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.
getLabel(
)
:
void
Get label to render
getTag(
)
:
void
Get HTML tag, if any, with which to surround label
render(
string $content
)
:
string
Render a label
setId(
string $id
)
:
Zend_Form_Decorator_Label
Set element ID
setTag(
string $tag
)
:
Zend_Form_Decorator_Label
Set HTML tag with which to surround label