protected function buildTextType(FormBuilderInterface $builder, array $options, string $fieldName, FieldDefinition $definition)
{
$typeOptions = $options['type_options'];
$typeForms = $options['type_forms'];
$isRequired = !$definition->isNullable();
$options = ['required' => $isRequired];
if ($isRequired) {
$options['constraints'] = [new NotBlank()];
}
$builder->add($fieldName, array_key_exists($fieldName, $typeForms) ? $typeForms[$fieldName] : TextType::class, array_key_exists($fieldName, $typeOptions) ? array_merge($options, $typeOptions[$fieldName]) : $options);
}