TYPO3
7.6
|
Public Member Functions | |
injectSessionUtility (\TYPO3\CMS\Form\Utility\SessionUtility $sessionUtility) | |
validate ($value) | |
canValidate ($object) | |
addPropertyValidator ($propertyName, ValidatorInterface $validator) | |
getPropertyValidators ($propertyName=null) | |
countPropertyValidators () | |
setValidatedInstancesContainer (\SplObjectStorage $validatedInstancesContainer) | |
Public Member Functions inherited from AbstractValidator | |
__construct (array $options=array()) | |
validate ($value) | |
getOptions () | |
Protected Member Functions | |
getPropertyValue (\TYPO3\CMS\Form\Domain\Model\ValidationElement $validationElement, $propertyName) | |
isValid ($object) | |
isValidatedAlready ($object) | |
Protected Member Functions inherited from AbstractValidator | |
isValid ($value) | |
addError ($message, $code, array $arguments=array(), $title= '') | |
isEmpty ($value) | |
translateErrorMessage ($translateKey, $extensionName, $arguments=array()) | |
Protected Attributes | |
$propertyValidators = array() | |
$sessionUtility | |
$validatedInstancesContainer | |
Protected Attributes inherited from AbstractValidator | |
$acceptsEmptyValues = true | |
$supportedOptions = array() | |
$options = array() | |
$result | |
A generic object validator which allows for specifying property validators
Definition at line 22 of file ValidationElementValidator.php.
addPropertyValidator | ( | $propertyName, | |
ValidatorInterface | $validator | ||
) |
Adds the given validator for validation of the specified property.
string | $propertyName | Name of the property to validate |
ValidatorInterface | $validator | The property validator |
Definition at line 188 of file ValidationElementValidator.php.
canValidate | ( | $object | ) |
Checks the given object can be validated by the validator implementation
mixed | $object | The object to be checked |
Definition at line 169 of file ValidationElementValidator.php.
countPropertyValidators | ( | ) |
Definition at line 232 of file ValidationElementValidator.php.
References ValidationElementValidator\$propertyValidators.
getPropertyValidators | ( | $propertyName = null | ) |
Returns all property validators - or only validators of the specified property
string | $propertyName | Name of the property to return validators for |
Definition at line 220 of file ValidationElementValidator.php.
References ValidationElementValidator\$propertyValidators.
|
protected |
Load the property value to be used for validation.
In case the object is a doctrine proxy, we need to load the real instance first.
\TYPO3\CMS\Form\Domain\Model\ValidationElement | $validationElement | |
string | $propertyName |
If a confirmation page is set and a fileupload was done before there is no incoming data if the process action is called. The data is only in the session at this time. This results in a negative validation (if a validation is set). Therefore, look first in the session.
Definition at line 73 of file ValidationElementValidator.php.
Referenced by ValidationElementValidator\isValid().
injectSessionUtility | ( | \TYPO3\CMS\Form\Utility\SessionUtility | $sessionUtility | ) |
\TYPO3\CMS\Form\Utility\SessionUtility | $sessionUtility |
Definition at line 37 of file ValidationElementValidator.php.
References ValidationElementValidator\$sessionUtility.
|
protected |
Checks if the given value is valid according to the property validators.
mixed | $object | The value that should be validated |
Definition at line 154 of file ValidationElementValidator.php.
References ValidationElementValidator\getPropertyValue().
Referenced by ValidationElementValidator\validate().
|
protected |
object | $object |
Definition at line 200 of file ValidationElementValidator.php.
Referenced by ValidationElementValidator\validate().
setValidatedInstancesContainer | ( | \SplObjectStorage | $validatedInstancesContainer | ) |
Allows to set a container to keep track of validated instances.
\SplObjectStorage | $validatedInstancesContainer | A container to keep track of validated instances |
Implements ObjectValidatorInterface.
Definition at line 253 of file ValidationElementValidator.php.
References ValidationElementValidator\$validatedInstancesContainer.
validate | ( | $value | ) |
Checks if the given value is valid according to the validator, and returns the Error Messages object which occurred.
mixed | $value | The value that should be validated |
Implements ValidatorInterface.
Definition at line 50 of file ValidationElementValidator.php.
References AbstractValidator\$result, AbstractValidator\addError(), elseif, AbstractValidator\isEmpty(), ValidationElementValidator\isValid(), and ValidationElementValidator\isValidatedAlready().
|
protected |
Definition at line 27 of file ValidationElementValidator.php.
Referenced by ValidationElementValidator\countPropertyValidators(), and ValidationElementValidator\getPropertyValidators().
|
protected |
Definition at line 32 of file ValidationElementValidator.php.
Referenced by ValidationElementValidator\injectSessionUtility().
|
protected |
Definition at line 244 of file ValidationElementValidator.php.
Referenced by ValidationElementValidator\setValidatedInstancesContainer().