TypeValidator

class TypeValidator extends ConstraintValidator Constants PRETTY_DATE Whether to format {@link \DateTime} objects as RFC-3339 dates ("Y-m-d H:i:s"). OBJECT_TO_STRING Whether to cast objects with a "__toString()" method to strings. Methods initialize(ExecutionContextInterface $context) Initializes the constraint validator. from ConstraintValidator validate(mixed $value, Constraint $constraint) Checks if the passed value is valid. Details initiali

TypeTestCase

class TypeTestCase extends FormIntegrationTestCase Methods static assertDateTimeEquals(DateTime $expected, DateTime $actual) Details static assertDateTimeEquals(DateTime $expected, DateTime $actual) Parameters DateTime $expected DateTime $actual

TypeGuess::getType()

string getType() Returns the guessed field type. Return Value string

TypeGuess::getOptions()

array getOptions() Returns the guessed options for creating instances of the guessed type. Return Value array

TypeGuess

class TypeGuess extends Guess Contains a guessed class name and a list of options for creating an instance of that class. Constants VERY_HIGH_CONFIDENCE Marks an instance with a value that is extremely likely to be correct. HIGH_CONFIDENCE Marks an instance with a value that is very likely to be correct. MEDIUM_CONFIDENCE Marks an instance with a value that is likely to be correct. LOW_CONFIDENCE Marks an instance with a value that may be correct. Methods static Guess|null

Type::isNullable()

bool isNullable() Allows null value? Return Value bool

Type::isCollection()

bool isCollection() Is collection? Return Value bool

Type::getRequiredOptions()

array getRequiredOptions() Returns the name of the required options. Override this method if you want to define required options. Return Value array

Type::getDefaultOption()

string getDefaultOption() Returns the name of the default option. Override this method to define a default option. Return Value string

Type::getCollectionValueType()

Type|null getCollectionValueType() Gets collection value type. Only applicable for a collection type. Return Value Type|null