TYPO3
7.6
|
Public Member Functions | |
initializeArguments () | |
render ($action=null, array $arguments=array(), $controller=null, $extensionName=null, $pluginName=null, $pageUid=null, $object=null, $pageType=0, $noCache=false, $noCacheHash=false, $section= '', $format= '', array $additionalParams=array(), $absolute=false, $addQueryString=false, array $argumentsToBeExcludedFromQueryString=array(), $fieldNamePrefix=null, $actionUri=null, $objectName=null, $hiddenFieldClassName=null) | |
Protected Attributes | |
$tagName = 'form' | |
$hashService | |
$mvcPropertyMappingConfigurationService | |
$extensionService | |
$formActionUriArguments | |
Protected Attributes inherited from AbstractFormViewHelper | |
$persistenceManager | |
Protected Attributes inherited from AbstractTagBasedViewHelper | |
$tag = null | |
$tagName = 'div' | |
Protected Attributes inherited from AbstractViewHelper | |
$arguments | |
$templateVariableContainer | |
$controllerContext | |
$renderingContext | |
$renderChildrenClosure = null | |
$viewHelperVariableContainer | |
$objectManager | |
$escapingInterceptorEnabled = true | |
Additional Inherited Members | |
Static Public Member Functions inherited from AbstractViewHelper | |
static | renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) |
Form view helper. Generates a <form> Tag.
= Basic usage =
Use <f:form> to output an HTML <form> tag which is targeted at the specified action, in the current controller and package. It will submit the form data via a POST request. If you want to change this, use method="get" as an argument. <f:form action="...">...</f:form>
= A complex form with a specified encoding type =
<f:form action=".." controller="..." package="..." enctype="multipart/form-data">...</f:form>
= A Form which should render a domain object =
<f:form action="..." name="customer" object="{customer}"> <f:form.hidden property="id" /> <f:form.textbox property="name" /> </f:form>
This automatically inserts the value of {customer.name} inside the textbox and adjusts the name of the textbox accordingly.
Definition at line 50 of file FormViewHelper.php.
|
protected |
Adds the field name prefix to the ViewHelperVariableContainer
Definition at line 298 of file FormViewHelper.php.
References FormViewHelper\getFieldNamePrefix().
Referenced by FormViewHelper\render().
|
protected |
Adds a container for form field names to the ViewHelperVariableContainer
Definition at line 333 of file FormViewHelper.php.
Referenced by FormViewHelper\render().
|
protected |
Adds the form object name to the ViewHelperVariableContainer if "objectName" argument or "name" attribute is specified.
Definition at line 228 of file FormViewHelper.php.
References FormViewHelper\getFormObjectName().
Referenced by FormViewHelper\render().
|
protected |
Adds the object that is bound to this form to the ViewHelperVariableContainer if the formObject attribute is specified.
Definition at line 272 of file FormViewHelper.php.
References AbstractViewHelper\hasArgument().
Referenced by FormViewHelper\render().
|
protected |
Retrieves the default field name prefix for this form
Definition at line 385 of file FormViewHelper.php.
References AbstractViewHelper\hasArgument().
Referenced by FormViewHelper\getFieldNamePrefix().
|
protected |
Get the field name prefix
Definition at line 309 of file FormViewHelper.php.
References FormViewHelper\getDefaultFieldNamePrefix(), and AbstractViewHelper\hasArgument().
Referenced by FormViewHelper\addFieldNamePrefixToViewHelperVariableContainer(), DownloadExtensionViewHelper\render(), FormViewHelper\renderRequestHashField(), and FormViewHelper\renderTrustedPropertiesField().
|
protected |
Returns the name of the object that is bound to this form. 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.
Definition at line 256 of file FormViewHelper.php.
References elseif, and AbstractViewHelper\hasArgument().
Referenced by FormViewHelper\addFormObjectNameToViewHelperVariableContainer(), FormViewHelper\removeFormObjectNameFromViewHelperVariableContainer(), and FormViewHelper\render().
initializeArguments | ( | ) |
Initialize arguments.
Definition at line 88 of file FormViewHelper.php.
References AbstractTagBasedViewHelper\registerTagAttribute(), and AbstractTagBasedViewHelper\registerUniversalTagAttributes().
|
protected |
Add the URI arguments after postprocessing to the request hash as well.
Definition at line 365 of file FormViewHelper.php.
References AbstractViewHelper\$arguments.
|
protected |
Remove Checkbox field names from ViewHelper variable container, to start from scratch when a new form starts.
Definition at line 408 of file FormViewHelper.php.
Referenced by FormViewHelper\render().
|
protected |
Removes field name prefix from the ViewHelperVariableContainer
Definition at line 323 of file FormViewHelper.php.
Referenced by FormViewHelper\render().
|
protected |
Removes the container for form field names from the ViewHelperVariableContainer
Definition at line 343 of file FormViewHelper.php.
Referenced by FormViewHelper\render().
|
protected |
Removes the form object from the ViewHelperVariableContainer.
Definition at line 285 of file FormViewHelper.php.
References AbstractViewHelper\hasArgument().
Referenced by FormViewHelper\render().
|
protected |
Removes the form name from the ViewHelperVariableContainer.
Definition at line 241 of file FormViewHelper.php.
References FormViewHelper\getFormObjectName().
Referenced by FormViewHelper\render().
render | ( | $action = null , |
|
array | $arguments = array() , |
||
$controller = null , |
|||
$extensionName = null , |
|||
$pluginName = null , |
|||
$pageUid = null , |
|||
$object = null , |
|||
$pageType = 0 , |
|||
$noCache = false , |
|||
$noCacheHash = false , |
|||
$section = '' , |
|||
$format = '' , |
|||
array | $additionalParams = array() , |
||
$absolute = false , |
|||
$addQueryString = false , |
|||
array | $argumentsToBeExcludedFromQueryString = array() , |
||
$fieldNamePrefix = null , |
|||
$actionUri = null , |
|||
$objectName = null , |
|||
$hiddenFieldClassName = null |
|||
) |
Render the form.
string | $action | Target action |
array | $arguments | Arguments |
string | $controller | Target controller |
string | $extensionName | Target Extension Name (without "tx_" prefix and no underscores). If NULL the current extension name is used |
string | $pluginName | Target plugin. If empty, the current plugin name is used |
int | $pageUid | Target page uid |
mixed | $object | Object to use for the form. Use in conjunction with the "property" attribute on the sub tags |
int | $pageType | Target page type |
bool | $noCache | set this to disable caching for the target page. You should not need this. |
bool | $noCacheHash | set this to suppress the cHash query parameter created by TypoLink. You should not need this. |
string | $section | The anchor to be added to the action URI (only active if $actionUri is not set) |
string | $format | The requested format (e.g. ".html") of the target page (only active if $actionUri is not set) |
array | $additionalParams | additional action URI query parameters that won't be prefixed like $arguments (overrule $arguments) (only active if $actionUri is not set) |
bool | $absolute | If set, an absolute action URI is rendered (only active if $actionUri is not set) |
bool | $addQueryString | If set, the current query parameters will be kept in the action URI (only active if $actionUri is not set) |
array | $argumentsToBeExcludedFromQueryString | arguments to be removed from the action URI. Only active if $addQueryString = TRUE and $actionUri is not set |
string | $fieldNamePrefix | Prefix that will be added to all field names within this form. If not set the prefix will be tx_yourExtension_plugin |
string | $actionUri | can be used to overwrite the "action" attribute of the form tag |
string | $objectName | 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 |
string | $hiddenFieldClassName |
Definition at line 123 of file FormViewHelper.php.
References FormViewHelper\addFieldNamePrefixToViewHelperVariableContainer(), FormViewHelper\addFormFieldNamesToViewHelperVariableContainer(), FormViewHelper\addFormObjectNameToViewHelperVariableContainer(), FormViewHelper\addFormObjectToViewHelperVariableContainer(), FormViewHelper\getFormObjectName(), FormViewHelper\removeCheckboxFieldNamesFromViewHelperVariableContainer(), FormViewHelper\removeFieldNamePrefixFromViewHelperVariableContainer(), FormViewHelper\removeFormFieldNamesFromViewHelperVariableContainer(), FormViewHelper\removeFormObjectFromViewHelperVariableContainer(), FormViewHelper\removeFormObjectNameFromViewHelperVariableContainer(), FormViewHelper\renderAdditionalIdentityFields(), AbstractViewHelper\renderChildren(), AbstractFormViewHelper\renderHiddenIdentityField(), FormViewHelper\renderHiddenReferrerFields(), FormViewHelper\renderTrustedPropertiesField(), and FormViewHelper\setFormActionUri().
|
protected |
Render additional identity fields which were registered by form elements. This happens if a form field is defined like property="bla.blubb" - then we might need an identity property for the sub-object "bla".
Definition at line 184 of file FormViewHelper.php.
Referenced by FormViewHelper\render().
|
protected |
Renders hidden form fields for referrer information about the current controller and action.
Definition at line 204 of file FormViewHelper.php.
References AbstractFormViewHelper\prefixFieldName().
Referenced by FormViewHelper\render().
|
protected |
Render the request hash field
Definition at line 353 of file FormViewHelper.php.
References FormViewHelper\getFieldNamePrefix(), and AbstractFormViewHelper\prefixFieldName().
|
protected |
Render the request hash field
Definition at line 420 of file FormViewHelper.php.
References FormViewHelper\getFieldNamePrefix(), and AbstractFormViewHelper\prefixFieldName().
Referenced by FormViewHelper\render().
|
protected |
Sets the "action" attribute of the form tag
Definition at line 166 of file FormViewHelper.php.
References AbstractViewHelper\hasArgument().
Referenced by FormViewHelper\render().
|
protected |
Definition at line 73 of file FormViewHelper.php.
|
protected |
Definition at line 81 of file FormViewHelper.php.
|
protected |
Definition at line 61 of file FormViewHelper.php.
|
protected |
Definition at line 67 of file FormViewHelper.php.
|
protected |
Definition at line 55 of file FormViewHelper.php.