Skip to content

Latest commit

 

History

History
182 lines (102 loc) · 5.76 KB

HelperReference.rst

File metadata and controls

182 lines (102 loc) · 5.76 KB

Fusion Form Helper Reference

This reference was automatically generated from code on 2021-03-22

NeosFusionFormDomainField

This object describes a single editable value in a form. Usually this is instantiated by the fusion prototype Neos.Fusion.Form:Definition.Field and can be accessed as field in the fusion context.

Implemented in: Neos\Fusion\Form\Domain\Field

NeosFusionFormDomainField.getCurrentMultivalueStringified()

Return (string[]) The current value of the field converted to an array of strings. Only used in multifields.

NeosFusionFormDomainField.getCurrentValue()

Return (mixed|null) The current value of the field

NeosFusionFormDomainField.getCurrentValueStringified()

Return (string) The current value of the field converted to string for being used as html field value

NeosFusionFormDomainField.getName()

NeosFusionFormDomainField.getResult()

Return (Result|null) The current result of the field if the field was already submitted

NeosFusionFormDomainField.getTargetValue()

Return (mixed|null) The target value that is assigned to the field

NeosFusionFormDomainField.getTargetValueStringified()

Return (string) The target value of the field converted to string for being used as html field value

NeosFusionFormDomainField.hasCurrentValue()

Return (bool) True if the current value of the field is not null

NeosFusionFormDomainField.hasErrors()

Return (bool) Return whether the field has validation errors

NeosFusionFormDomainField.isMultiple()

Return (bool) True if the field is configured as multiple

NeosFusionFormDomainField.withTargetValue(targetValue)

Create and return a copy of this field with alternate value This is used to render multiple checkboxes or radio in a single field container

  • targetValue (mixed|null, optional)

Return (Field)

NeosFusionFormDomainForm

This object describes a the main properties of a form. Usually this is instantiated by the fusion prototype Neos.Fusion.Form:Definition.Form and can be accessed as form in the fusion context.

Implemented in: Neos\Fusion\Form\Domain\Form

NeosFusionFormDomainForm.calculateHiddenFields(content)

Calculate the hidden fields for the given form content as key-value array.

This works by parsing the given content and detecting all html fields. This allow to support fields that are rendered withoput using the Neos.Fusion.Form prototypes and to calculate hidden identify and trusted properties for those fields aswell.

  • content (string, optional) The form html body, usually renderd via afx

Return (string[]) hiddenFields as key value pairs

NeosFusionFormDomainForm.getData()

Return (mixed) The data that was bound to the form, usually a DataStructure

NeosFusionFormDomainForm.getEncoding()

Return (string|null) The encoding for the form

NeosFusionFormDomainForm.getMethod()

Return (string|null) The http method for submitting the form

NeosFusionFormDomainForm.getNamespace()

Return (string|null) The namespace prefix that was assigned or determined from the request

NeosFusionFormDomainForm.getRequest()

Return (ActionRequest|null) The ActionRequest the form is rendered with

NeosFusionFormDomainForm.getResult()

Return (Result) The result for the whole form, can be used to render validation messahes in a central place

NeosFusionFormDomainForm.getSubmittedValues()

Return (mixed[]|null) The previously submitted values when validation errors prevented processing the data

NeosFusionFormDomainForm.getTarget()

Return (string|null) The target uri for the form, usually defined as Neos.Fusion:UriBuilder

NeosFusionFormDomainForm.hasErrors()

Return (bool) Return whether the form had validation errors in a previous submit

NeosFusionFormDomainOption

This object describes a single target value for a form field. Usually this is instantiated by the fusion prototype Neos.Fusion.Form:Definition.Option and can be accessed as option in the fusion context.

Implemented in: Neos\Fusion\Form\Domain\Option

NeosFusionFormDomainOption.getTargetValue()

Return (mixed) The target value of the option

NeosFusionFormDomainOption.getTargetValueStringified()

Return (string) The target value of the option converted to string for being used as html option value