TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator:
TYPO3\CMS\Extbase\Validation\Validator\GenericObjectValidator TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator TYPO3\CMS\Extbase\Validation\Validator\ObjectValidatorInterface TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface

Public Member Functions

 validate ($value)
 
 isValid ($value)
 
- Public Member Functions inherited from TYPO3\CMS\Extbase\Validation\Validator\GenericObjectValidator
 validate ($value)
 
 isValid ($object)
 
 canValidate ($object)
 
 isPropertyValid ($object, $propertyName)
 
 addPropertyValidator ($propertyName, \TYPO3\CMS\Extbase\Validation\Validator\ValidatorInterface $validator)
 
 getPropertyValidators ($propertyName=NULL)
 
 injectConfigurationManager (\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface $configurationManager)
 
 setValidatedInstancesContainer (\SplObjectStorage $validatedInstancesContainer)
 
- Public Member Functions inherited from TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
 __construct (array $options=array())
 
 validate ($value)
 
 setOptions (array $options)
 
 getErrors ()
 
 getOptions ()
 

Protected Attributes

 $supportedOptions
 
 $validatorResolver
 
- Protected Attributes inherited from TYPO3\CMS\Extbase\Validation\Validator\GenericObjectValidator
 $propertyValidators = array()
 
 $configurationManager
 
 $validatedInstancesContainer
 
- Protected Attributes inherited from TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
 $acceptsEmptyValues = TRUE
 
 $supportedOptions = array()
 
 $options = array()
 
 $errors = array()
 
 $result
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Extbase\Validation\Validator\GenericObjectValidator
 getPropertyValue ($object, $propertyName)
 
 checkProperty ($value, $validators, $propertyName)
 
 addErrorsForProperty ($errors, $propertyName)
 
 isValidatedAlready ($object)
 
- Protected Member Functions inherited from TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator
 isValid ($value)
 
 addError ($message, $code, array $arguments=array(), $title='')
 
 isEmpty ($value)
 
 translateErrorMessage ($translateKey, $extensionName, $arguments=array())
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! A generic collection validator.

Definition at line 22 of file CollectionValidator.php.

Member Function Documentation

◆ isValid()

TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator::isValid (   $value)

Checks for a collection and if needed validates the items in the collection. This is done with the specified element validator or a validator based on the given element type and validation group.

Either elementValidator or elementType must be given, otherwise validation will be skipped.

Parameters
mixed$valueA collection to be validated
Returns
void
Todo:
: method must be protected once the old property mapper is removed

Definition at line 77 of file CollectionValidator.php.

Referenced by TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator\validate().

◆ validate()

TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator::validate (   $value)

Member Data Documentation

◆ $supportedOptions

TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator::$supportedOptions
protected
Initial value:
= array(
'elementValidator' => array(NULL, 'The validator type to use for the collection elements', 'string'),
'elementType' => array(NULL, 'The type of the elements in the collection', 'string'),
'validationGroups' => array(NULL, 'The validation groups to link to', 'string'),
)

Definition at line 27 of file CollectionValidator.php.

◆ $validatorResolver

TYPO3\CMS\Extbase\Validation\Validator\CollectionValidator::$validatorResolver
protected

Definition at line 37 of file CollectionValidator.php.