CodeExplorer getMinValue example
protected function getConstraints(Field
$field): array
{ $constraints =
[ new Type('int'
),
new NotBlank(),
];
if ($field->
getMinValue() !== null ||
$field->
getMaxValue() !== null
) { $constraints[] =
new Range(['min' =>
$field->
getMinValue(), 'max' =>
$field->
getMaxValue()]);
} return $constraints;
}}