Method | Description | |
---|---|---|
__construct ( Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface $metadataFactory ) | ||
guessMaxLength ( $class, $property ) | {@inheritDoc} | |
guessMaxLengthForConstraint ( |
Guesses a field's maximum length based on the given constraint | |
guessMinLength ( $class, $property ) | {@inheritDoc} | |
guessMinLengthForConstraint ( |
Guesses a field's minimum length based on the given constraint | |
guessRequired ( $class, $property ) | {@inheritDoc} | |
guessRequiredForConstraint ( |
Guesses whether a field is required based on the given constraint | |
guessType ( $class, $property ) | {@inheritDoc} | |
guessTypeForConstraint ( |
Guesses a field class name for a given constraint |
Method | Description | |
---|---|---|
guess ( string $class, string $property, Closure $guessForConstraint ) : Symfony\Component\Form\Guess\Guess | Iterates over the constraints of a property, executes a constraints on them and returns the best guess |
public __construct ( Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface $metadataFactory ) | ||
$metadataFactory | Symfony\Component\Validator\Mapping\ClassMetadataFactoryInterface |
protected guess ( string $class, string $property, Closure $guessForConstraint ) : Symfony\Component\Form\Guess\Guess | ||
$class | string | The class to read the constraints from |
$property | string | The property for which to find constraints |
$guessForConstraint | Closure | The closure that returns a guess for a given constraint |
return | Symfony\Component\Form\Guess\Guess | The guessed value with the highest confidence |
public guessMaxLengthForConstraint ( |
||
$constraint | The constraint to guess for | |
return | Symfony\Component\Form\Guess\Guess | The guess for the maximum length |
public guessMinLengthForConstraint ( |
||
$constraint | The constraint to guess for | |
return | Symfony\Component\Form\Guess\Guess | The guess for the minimum length |
public guessRequiredForConstraint ( |
||
$constraint | The constraint to guess for | |
return | Symfony\Component\Form\Guess\Guess | The guess whether the field is required |
public guessTypeForConstraint ( |
||
$constraint | The constraint to guess for | |
return | Symfony\Component\Form\Guess\TypeGuess | The guessed field class and options |