TYPO3  7.6
Public Member Functions | List of all members
ValidationResultsViewHelper Class Reference
Inheritance diagram for ValidationResultsViewHelper:
AbstractViewHelper

Public Member Functions

 render ($for= '', $as= 'validationResults')
 
- Public Member Functions inherited from AbstractViewHelper
 setArguments (array $arguments)
 
 setRenderingContext (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 isEscapingInterceptorEnabled ()
 
 setViewHelperNode (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node)
 
 setRenderChildrenClosure (\Closure $renderChildrenClosure)
 
 initializeArgumentsAndRender ()
 
 initialize ()
 
 renderChildren ()
 
 prepareArguments ()
 
 validateArguments ()
 
 initializeArguments ()
 
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode,\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode,\TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 
 resetState ()
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractViewHelper
static renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Protected Member Functions inherited from AbstractViewHelper
 registerArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 overrideArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 callRenderMethod ()
 
 getLogger ()
 
 buildRenderChildrenClosure ()
 
 hasArgument ($argumentName)
 
- Protected Attributes inherited from AbstractViewHelper
 $arguments
 
 $templateVariableContainer
 
 $controllerContext
 
 $renderingContext
 
 $renderChildrenClosure = null
 
 $viewHelperVariableContainer
 
 $objectManager
 
 $escapingInterceptorEnabled = true
 

Detailed Description

Validation results view helper

= Examples =

<f:form.validationResults> <f:if condition="{validationResults.flattenedErrors}">

f:for each="{validationResults.flattenedErrors}" as="errors" key="propertyPath"> {propertyPath}

f:for each="{errors}" as="error"> {error.code}: {error} </f:for> </f:for> </f:if> </f:form.validationResults> <output>

</output>

<f:form.validationResults for="someProperty"> <f:if condition="{validationResults.flattenedErrors}">

f:for each="{validationResults.errors}" as="error"> {error.code}: {error} </f:for> </f:if> </f:form.validationResults> <output>

</output>

Definition at line 71 of file ValidationResultsViewHelper.php.

Member Function Documentation

render (   $for = '',
  $as = 'validationResults' 
)

Iterates through selected errors of the request.

Parameters
string$forThe name of the error name (e.g. argument name or property name). This can also be a property path (like blog.title), and will then only display the validation errors of that property.
string$asThe name of the variable to store the current error
Returns
string Rendered string

Definition at line 81 of file ValidationResultsViewHelper.php.

References AbstractViewHelper\renderChildren().