fix error with post_text extension

This commit is contained in:
Julien Fastré 2018-07-18 16:46:29 +02:00
parent 23e68416a2
commit 5558db5102
2 changed files with 11 additions and 10 deletions

View File

@ -19,6 +19,8 @@
namespace Chill\CustomFieldsBundle\Form\Extension;
use Symfony\Component\Form\Extension\Core\Type\NumberType;
/**
* This class add the PostTextExtension to number fields
*
@ -28,7 +30,7 @@ class PostTextNumberExtension extends PostTextExtension
{
public function getExtendedType()
{
return PostTextNumberExtension::class;
return NumberType::class;
}
}

View File

@ -50,16 +50,15 @@ services:
tags:
- { name: 'chill.custom_field', type: 'number' }
# no more used in symfony 3.x
# chill.form_extension.post_text_integer:
# class: Chill\CustomFieldsBundle\Form\Extension\PostTextIntegerExtension
# tags:
# - { name: form.type_extension, alias: 'integer' }
chill.form_extension.post_text_integer:
class: Chill\CustomFieldsBundle\Form\Extension\PostTextIntegerExtension
tags:
- { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\IntegerType }
# chill.form_extension.post_text_number:
# class: Chill\CustomFieldsBundle\Form\Extension\PostTextNumberExtension
# tags:
# - { name: form.type_extension, alias: 'number' }
chill.form_extension.post_text_number:
class: Chill\CustomFieldsBundle\Form\Extension\PostTextNumberExtension
tags:
- { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\NumberType }
chill.custom_field.choice:
class: Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice