PHP Class Neos\FluidAdaptor\ViewHelpers\FormViewHelper

= Examples = ...
...
...
...
...
...
A form where the value of {customer.name} is automatically inserted inside the textbox; the name of the textbox is set to match the property name.
Inheritance: extends Neos\FluidAdaptor\ViewHelpers\Form\AbstractFormViewHelper
Afficher le fichier Open project: neos/flow-development-collection

Protected Properties

Свойство Type Description
$authenticationManager Neos\Flow\Security\Authentication\AuthenticationManagerInterface
$formActionUri string
$hashService Neos\Flow\Security\Cryptography\HashService
$mvcPropertyMappingConfigurationService Neos\Flow\Mvc\Controller\MvcPropertyMappingConfigurationService
$securityContext Neos\Flow\Security\Context
$tagName string

Méthodes publiques

Méthode Description
initializeArguments ( ) : void Initialize arguments.
render ( string $action = null, array $arguments = [], string $controller = null, string $package = null, string $subpackage = null, mixed $object = null, string $section = '', string $format = '', array $additionalParams = [], boolean $absolute = false, boolean $addQueryString = false, array $argumentsToBeExcludedFromQueryString = [], string $fieldNamePrefix = null, string $actionUri = null, string $objectName = null, boolean $useParentRequest = false ) : string Render the form.

Méthodes protégées

Méthode Description
addEmptyHiddenFieldNamesToViewHelperVariableContainer ( ) : void Adds a container for rendered hidden field names for empty values to the ViewHelperVariableContainer
addFieldNamePrefixToViewHelperVariableContainer ( ) : void Adds the field name prefix to the ViewHelperVariableContainer
addFormFieldNamesToViewHelperVariableContainer ( ) : void Adds a container for form field names to the ViewHelperVariableContainer
addFormObjectNameToViewHelperVariableContainer ( ) : void Adds the form object name to the ViewHelperVariableContainer if "objectName" argument or "name" attribute is specified.
addFormObjectToViewHelperVariableContainer ( ) : void Adds the object that is bound to this form to the ViewHelperVariableContainer if the formObject attribute is specified.
getDefaultFieldNamePrefix ( ) : string Retrieves the default field name prefix for this form
getFieldNamePrefix ( ) : string Get the field name prefix
getFormActionUri ( ) : string Returns the action URI of the form tag.
getFormObjectName ( ) : string Returns the name of the object that is bound to this form.
removeEmptyHiddenFieldNamesFromViewHelperVariableContainer ( ) : void Removes container for rendered hidden field names for empty values from ViewHelperVariableContainer
removeFieldNamePrefixFromViewHelperVariableContainer ( ) : void Removes field name prefix from the ViewHelperVariableContainer
removeFormFieldNamesFromViewHelperVariableContainer ( ) : void Removes the container for form field names from the ViewHelperVariableContainer
removeFormObjectFromViewHelperVariableContainer ( ) : void Removes the form object from the ViewHelperVariableContainer.
removeFormObjectNameFromViewHelperVariableContainer ( ) : void Removes the form object name from the ViewHelperVariableContainer.
renderAdditionalIdentityFields ( ) : string Render additional identity fields which were registered by form elements.
renderCsrfTokenField ( ) : string Render the a hidden field with a CSRF token
renderEmptyHiddenFields ( ) : string Renders all empty hidden fields that have been added to ViewHelperVariableContainer
renderHiddenActionUriQueryParameters ( ) : string Render hidden form fields for query parameters from action URI.
renderHiddenReferrerFields ( ) : string Renders hidden form fields for referrer information about the current controller and action.
renderTrustedPropertiesField ( ) : string Render the request hash field

Method Details

addEmptyHiddenFieldNamesToViewHelperVariableContainer() protected méthode

Adds a container for rendered hidden field names for empty values to the ViewHelperVariableContainer
See also: Neos\FluidAdaptor\ViewHelpers\Form\AbstractFormFieldViewHelper::renderHiddenFieldForEmptyValue()

addFieldNamePrefixToViewHelperVariableContainer() protected méthode

Adds the field name prefix to the ViewHelperVariableContainer

addFormFieldNamesToViewHelperVariableContainer() protected méthode

Adds a container for form field names to the ViewHelperVariableContainer

addFormObjectNameToViewHelperVariableContainer() protected méthode

Adds the form object name to the ViewHelperVariableContainer if "objectName" argument or "name" attribute is specified.

addFormObjectToViewHelperVariableContainer() protected méthode

Adds the object that is bound to this form to the ViewHelperVariableContainer if the formObject attribute is specified.

getDefaultFieldNamePrefix() protected méthode

Retrieves the default field name prefix for this form
protected getDefaultFieldNamePrefix ( ) : string
Résultat string default field name prefix

getFieldNamePrefix() protected méthode

Get the field name prefix
protected getFieldNamePrefix ( ) : string
Résultat string

getFormActionUri() protected méthode

If the argument "actionUri" is specified, this will be returned Otherwise this creates the action URI using the UriBuilder
protected getFormActionUri ( ) : string
Résultat string

getFormObjectName() protected méthode

If the "objectName" argument has been specified, this is returned. Otherwise the name attribute of this form. If neither objectName nor name arguments have been set, NULL is returned.
protected getFormObjectName ( ) : string
Résultat string specified Form name or NULL if neither $objectName nor $name arguments have been specified

initializeArguments() public méthode

Initialize arguments.
public initializeArguments ( ) : void
Résultat void

removeEmptyHiddenFieldNamesFromViewHelperVariableContainer() protected méthode

Removes container for rendered hidden field names for empty values from ViewHelperVariableContainer
See also: Neos\FluidAdaptor\ViewHelpers\Form\AbstractFormFieldViewHelper::renderHiddenFieldForEmptyValue()

removeFieldNamePrefixFromViewHelperVariableContainer() protected méthode

Removes field name prefix from the ViewHelperVariableContainer

removeFormFieldNamesFromViewHelperVariableContainer() protected méthode

Removes the container for form field names from the ViewHelperVariableContainer

removeFormObjectFromViewHelperVariableContainer() protected méthode

Removes the form object from the ViewHelperVariableContainer.

removeFormObjectNameFromViewHelperVariableContainer() protected méthode

Removes the form object name from the ViewHelperVariableContainer.

render() public méthode

Render the form.
public render ( string $action = null, array $arguments = [], string $controller = null, string $package = null, string $subpackage = null, mixed $object = null, string $section = '', string $format = '', array $additionalParams = [], boolean $absolute = false, boolean $addQueryString = false, array $argumentsToBeExcludedFromQueryString = [], string $fieldNamePrefix = null, string $actionUri = null, string $objectName = null, boolean $useParentRequest = false ) : string
$action string target action
$arguments array additional arguments
$controller string name of target controller
$package string name of target package
$subpackage string name of target subpackage
$object mixed object to use for the form. Use in conjunction with the "property" attribute on the sub tags
$section string The anchor to be added to the action URI (only active if $actionUri is not set)
$format string The requested format (e.g. ".html") of the target page (only active if $actionUri is not set)
$additionalParams array additional action URI query parameters that won't be prefixed like $arguments (overrule $arguments) (only active if $actionUri is not set)
$absolute boolean If set, an absolute action URI is rendered (only active if $actionUri is not set)
$addQueryString boolean If set, the current query parameters will be kept in the action URI (only active if $actionUri is not set)
$argumentsToBeExcludedFromQueryString array arguments to be removed from the action URI. Only active if $addQueryString = TRUE and $actionUri is not set
$fieldNamePrefix string Prefix that will be added to all field names within this form
$actionUri string can be used to overwrite the "action" attribute of the form tag
$objectName string name of the object that is bound to this form. If this argument is not specified, the name attribute of this form is used to determine the FormObjectName
$useParentRequest boolean If set, the parent Request will be used instead ob the current one
Résultat string rendered form

renderAdditionalIdentityFields() protected méthode

This happens if a form field is defined like property="bla.blubb" - then we might need an identity property for the sub-object "bla".
protected renderAdditionalIdentityFields ( ) : string
Résultat string HTML-string for the additional identity properties

renderCsrfTokenField() protected méthode

Render the a hidden field with a CSRF token
protected renderCsrfTokenField ( ) : string
Résultat string the CSRF token field

renderEmptyHiddenFields() protected méthode

Renders all empty hidden fields that have been added to ViewHelperVariableContainer
See also: Neos\FluidAdaptor\ViewHelpers\Form\AbstractFormFieldViewHelper::renderHiddenFieldForEmptyValue()
protected renderEmptyHiddenFields ( ) : string
Résultat string

renderHiddenActionUriQueryParameters() protected méthode

This is only needed if the form method is GET.
protected renderHiddenActionUriQueryParameters ( ) : string
Résultat string Hidden fields for query parameters from action URI

renderHiddenReferrerFields() protected méthode

Renders hidden form fields for referrer information about the current controller and action.
protected renderHiddenReferrerFields ( ) : string
Résultat string Hidden fields with referrer information

renderTrustedPropertiesField() protected méthode

Render the request hash field
protected renderTrustedPropertiesField ( ) : string
Résultat string the hmac field

Property Details

$authenticationManager protected_oe property

protected AuthenticationManagerInterface,Neos\Flow\Security\Authentication $authenticationManager
Résultat Neos\Flow\Security\Authentication\AuthenticationManagerInterface

$formActionUri protected_oe property

protected string $formActionUri
Résultat string

$hashService protected_oe property

protected HashService,Neos\Flow\Security\Cryptography $hashService
Résultat Neos\Flow\Security\Cryptography\HashService

$mvcPropertyMappingConfigurationService protected_oe property

protected MvcPropertyMappingConfigurationService,Neos\Flow\Mvc\Controller $mvcPropertyMappingConfigurationService
Résultat Neos\Flow\Mvc\Controller\MvcPropertyMappingConfigurationService

$securityContext protected_oe property

protected Context,Neos\Flow\Security $securityContext
Résultat Neos\Flow\Security\Context

$tagName protected_oe property

protected string $tagName
Résultat string