‪TYPO3CMS  11.5
TYPO3\CMS\Form\Mvc\ProcessingRule Class Reference

Public Member Functions

 __construct (PropertyMapper $propertyMapper)
 
PropertyMappingConfiguration getPropertyMappingConfiguration ()
 
string getDataType ()
 
 setDataType (string $dataType)
 
SplObjectStorage getValidators ()
 
 addValidator (ValidatorInterface $validator)
 
 removeAllValidators ()
 
 filterValidators (\Closure $filter)
 
 removeValidator (ValidatorInterface $validator)
 
mixed process ($value)
 
Result getProcessingMessages ()
 

Protected Attributes

string $dataType
 
PropertyMappingConfiguration $propertyMappingConfiguration
 
ConjunctionValidator $validator
 
Result $processingMessages
 
PropertyMapper $propertyMapper
 

Detailed Description

A processing Rule contains information for property mapping and validation.

Scope: frontend This class is NOT meant to be sub classed by developers.

Definition at line 34 of file ProcessingRule.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Form\Mvc\ProcessingRule::__construct ( PropertyMapper  $propertyMapper)

Constructs this processing rule

Definition at line 51 of file ProcessingRule.php.

References TYPO3\CMS\Form\Mvc\ProcessingRule\$propertyMapper.

Member Function Documentation

◆ addValidator()

TYPO3\CMS\Form\Mvc\ProcessingRule::addValidator ( ValidatorInterface  $validator)
Parameters
ValidatorInterface$validator

Definition at line 101 of file ProcessingRule.php.

References TYPO3\CMS\Form\Mvc\ProcessingRule\$validator.

◆ filterValidators()

TYPO3\CMS\Form\Mvc\ProcessingRule::filterValidators ( \Closure  $filter)

◆ getDataType()

string TYPO3\CMS\Form\Mvc\ProcessingRule::getDataType ( )
Returns
‪string

Definition at line 72 of file ProcessingRule.php.

References TYPO3\CMS\Form\Mvc\ProcessingRule\$dataType.

◆ getProcessingMessages()

Result TYPO3\CMS\Form\Mvc\ProcessingRule::getProcessingMessages ( )
Returns
‪Result

Definition at line 171 of file ProcessingRule.php.

References TYPO3\CMS\Form\Mvc\ProcessingRule\$processingMessages.

◆ getPropertyMappingConfiguration()

PropertyMappingConfiguration TYPO3\CMS\Form\Mvc\ProcessingRule::getPropertyMappingConfiguration ( )
Returns
‪PropertyMappingConfiguration

Definition at line 63 of file ProcessingRule.php.

References TYPO3\CMS\Form\Mvc\ProcessingRule\$propertyMappingConfiguration.

◆ getValidators()

SplObjectStorage TYPO3\CMS\Form\Mvc\ProcessingRule::getValidators ( )

Returns the child validators of the ConjunctionValidator that is bound to this processing rule

Returns
‪\SplObjectStorage

Definition at line 92 of file ProcessingRule.php.

Referenced by TYPO3\CMS\Form\Mvc\ProcessingRule\filterValidators().

◆ process()

mixed TYPO3\CMS\Form\Mvc\ProcessingRule::process (   $value)
Parameters
mixed$value
Returns
‪mixed

Definition at line 150 of file ProcessingRule.php.

◆ removeAllValidators()

TYPO3\CMS\Form\Mvc\ProcessingRule::removeAllValidators ( )

Initializes a new validator container

Definition at line 111 of file ProcessingRule.php.

References TYPO3\CMS\Form\Mvc\ProcessingRule\filterValidators().

Referenced by TYPO3\CMS\Form\Domain\Model\Renderable\AbstractRenderable\setOptions().

◆ removeValidator()

TYPO3\CMS\Form\Mvc\ProcessingRule::removeValidator ( ValidatorInterface  $validator)

Removes the specified validator.

Parameters
ValidatorInterface$validator‪The validator to remove
Exceptions

Definition at line 140 of file ProcessingRule.php.

References TYPO3\CMS\Form\Mvc\ProcessingRule\$validator.

◆ setDataType()

TYPO3\CMS\Form\Mvc\ProcessingRule::setDataType ( string  $dataType)
Parameters
string$dataType

Definition at line 81 of file ProcessingRule.php.

References TYPO3\CMS\Form\Mvc\ProcessingRule\$dataType.

Member Data Documentation

◆ $dataType

string TYPO3\CMS\Form\Mvc\ProcessingRule::$dataType
protected

The target data type the data should be converted to

Definition at line 40 of file ProcessingRule.php.

Referenced by TYPO3\CMS\Form\Mvc\ProcessingRule\getDataType(), and TYPO3\CMS\Form\Mvc\ProcessingRule\setDataType().

◆ $processingMessages

Result TYPO3\CMS\Form\Mvc\ProcessingRule::$processingMessages
protected

◆ $propertyMapper

PropertyMapper TYPO3\CMS\Form\Mvc\ProcessingRule::$propertyMapper
protected

Definition at line 45 of file ProcessingRule.php.

Referenced by TYPO3\CMS\Form\Mvc\ProcessingRule\__construct().

◆ $propertyMappingConfiguration

PropertyMappingConfiguration TYPO3\CMS\Form\Mvc\ProcessingRule::$propertyMappingConfiguration
protected

◆ $validator