PHP 클래스 Zend_Form_Decorator_ViewHelper

Decorate an element by using a view helper to render it. Accepts the following options: - separator: string with which to separate passed in content and generated content - placement: whether to append or prepend the generated content to the passed in content - helper: the name of the view helper to use Assumes the view helper accepts three parameters, the name, value, and optional attributes; these will be provided by the element.
상속: extends Zend_Form_Decorator_Abstract
파일 보기 프로젝트 열기: kimai/kimai 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_buttonTypes array Element types that represent buttons
$_helper string View helper to use when rendering

공개 메소드들

메소드 설명
getElementAttribs ( ) : array Retrieve element attributes
getHelper ( ) : string Retrieve view helper for rendering element
getName ( ) : string Get name
getValue ( Zend_Form_Element $element ) : string | null Get value
render ( string $content ) : string Render an element using a view helper
setHelper ( string $helper ) : Zend_Form_Decorator_Element_ViewHelper Set view helper to use when rendering

메소드 상세

getElementAttribs() 공개 메소드

Set id to element name and/or array item.
public getElementAttribs ( ) : array
리턴 array

getHelper() 공개 메소드

Retrieve view helper for rendering element
public getHelper ( ) : string
리턴 string

getName() 공개 메소드

If element is a Zend_Form_Element, will attempt to namespace it if the element belongs to an array.
public getName ( ) : string
리턴 string

getValue() 공개 메소드

If element type is one of the button types, returns the label.
public getValue ( Zend_Form_Element $element ) : string | null
$element Zend_Form_Element
리턴 string | null

render() 공개 메소드

Determine view helper from 'viewHelper' option, or, if none set, from the element type. Then call as helper($element->getName(), $element->getValue(), $element->getAttribs())
public render ( string $content ) : string
$content string
리턴 string

setHelper() 공개 메소드

Set view helper to use when rendering
public setHelper ( string $helper ) : Zend_Form_Decorator_Element_ViewHelper
$helper string
리턴 Zend_Form_Decorator_Element_ViewHelper

프로퍼티 상세

$_buttonTypes 보호되어 있는 프로퍼티

Element types that represent buttons
protected array $_buttonTypes
리턴 array

$_helper 보호되어 있는 프로퍼티

View helper to use when rendering
protected string $_helper
리턴 string