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
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.
protected addAdditionalIdentityPropertiesIfNeeded ( ) : void
Результат void

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