PHP 클래스 Neos\FluidAdaptor\ViewHelpers\Form\AbstractFormFieldViewHelper

If you set the "property" attribute to the name of the property to resolve from the object, this class will automatically set the name and value of a form element.
상속: extends AbstractFormViewHelper
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

공개 메소드들

메소드 설명
initializeArguments ( ) : void

보호된 메소드들

메소드 설명
addAdditionalIdentityPropertiesIfNeeded ( ) : void Add additional identity properties in case the current property is hierarchical (of the form "bla.blubb").
getLastSubmittedFormData ( ) : mixed Get the form data which has last been submitted; only returns valid data in case a property mapping error has occurred. Check with hasMappingErrorOccurred() before!
getMappingResultsForProperty ( ) : Neos\Error\Messages\Result Get errors for the property and form name of this view helper
getName ( ) : string Get the name of this form element.
getNameWithoutPrefix ( ) : string Get the name of this form element, without prefix.
getPropertyPath ( ) : string Returns the "absolute" property path of the property bound to this ViewHelper.
getPropertyValue ( ) : mixed Get the current property of the object bound to this form.
getRequest ( ) : ActionRequest Shortcut for retrieving the request from the controller context
getValue ( boolean $convertObjects = true ) : mixed Get the value of this form element.
getValueAttribute ( boolean $ignoreSubmittedFormData = false ) : mixed Returns the current value of this Form ViewHelper and converts it to an identifier string in case it's an object The value is determined as follows: * If property mapping errors occurred and the form is re-displayed, the *last submitted* value is returned * Else the bound property is returned (only in objectAccessor-mode) * As fallback the "value" argument of this ViewHelper is used
hasMappingErrorOccured ( ) : boolean
hasMappingErrorOccurred ( ) : boolean Checks if a property mapping error has occurred in the last request.
isObjectAccessorMode ( ) : boolean Internal method which checks if we should evaluate a domain object or just output arguments['name'] and arguments['value']
renderHiddenFieldForEmptyValue ( ) : void Renders a hidden field with the same name as the element, to make sure the empty value is submitted in case nothing is selected. This is needed for checkbox and multiple select fields
setErrorClassAttribute ( ) : void Add an CSS class if this view helper has errors

메소드 상세

addAdditionalIdentityPropertiesIfNeeded() 보호된 메소드

Then, [bla][__identity] has to be generated as well.

getLastSubmittedFormData() 보호된 메소드

Get the form data which has last been submitted; only returns valid data in case a property mapping error has occurred. Check with hasMappingErrorOccurred() before!
protected getLastSubmittedFormData ( ) : mixed
리턴 mixed

getMappingResultsForProperty() 보호된 메소드

Get errors for the property and form name of this view helper
protected getMappingResultsForProperty ( ) : Neos\Error\Messages\Result
리턴 Neos\Error\Messages\Result

getName() 보호된 메소드

Either returns arguments['name'], or the correct name for Object Access. In case property is something like bla.blubb (hierarchical), then [bla][blubb] is generated.
protected getName ( ) : string
리턴 string Name

getNameWithoutPrefix() 보호된 메소드

Get the name of this form element, without prefix.
protected getNameWithoutPrefix ( ) : string
리턴 string name

getPropertyPath() 보호된 메소드

For this will be ".foo.bar" For this will be "foo.bar.baz"
protected getPropertyPath ( ) : string
리턴 string

getPropertyValue() 보호된 메소드

Get the current property of the object bound to this form.
protected getPropertyValue ( ) : mixed
리턴 mixed Value

getRequest() 보호된 메소드

Shortcut for retrieving the request from the controller context
protected getRequest ( ) : ActionRequest
리턴 Neos\Flow\Mvc\ActionRequest

getValue() 보호된 메소드

Either returns arguments['value'], or the correct value for Object Access.
사용 중단: since Flow 3.0. Use getValueAttribute() and (if applicable) addAdditionalIdentityPropertiesIfNeeded()
protected getValue ( boolean $convertObjects = true ) : mixed
$convertObjects boolean whether or not to convert objects to identifiers
리턴 mixed Value

getValueAttribute() 보호된 메소드

Returns the current value of this Form ViewHelper and converts it to an identifier string in case it's an object The value is determined as follows: * If property mapping errors occurred and the form is re-displayed, the *last submitted* value is returned * Else the bound property is returned (only in objectAccessor-mode) * As fallback the "value" argument of this ViewHelper is used
protected getValueAttribute ( boolean $ignoreSubmittedFormData = false ) : mixed
$ignoreSubmittedFormData boolean By default the submitted form value has precedence over value/property argument upon re-display. With this flag set the submitted data is not evaluated (e.g. for checkbox and hidden fields where the value attribute should not be changed)
리턴 mixed Value

hasMappingErrorOccured() 보호된 메소드

사용 중단: since 2.1 Use hasMappingErrorOccurred() instead
protected hasMappingErrorOccured ( ) : boolean
리턴 boolean TRUE if a mapping error occurred, FALSE otherwise

hasMappingErrorOccurred() 보호된 메소드

Checks if a property mapping error has occurred in the last request.
protected hasMappingErrorOccurred ( ) : boolean
리턴 boolean TRUE if a mapping error occurred, FALSE otherwise

initializeArguments() 공개 메소드

public initializeArguments ( ) : void
리턴 void

isObjectAccessorMode() 보호된 메소드

Internal method which checks if we should evaluate a domain object or just output arguments['name'] and arguments['value']
protected isObjectAccessorMode ( ) : boolean
리턴 boolean TRUE if we should evaluate the domain object, FALSE otherwise.

renderHiddenFieldForEmptyValue() 보호된 메소드

Renders a hidden field with the same name as the element, to make sure the empty value is submitted in case nothing is selected. This is needed for checkbox and multiple select fields
protected renderHiddenFieldForEmptyValue ( ) : void
리턴 void

setErrorClassAttribute() 보호된 메소드

Add an CSS class if this view helper has errors
protected setErrorClassAttribute ( ) : void
리턴 void