move service form.type definition to new file + introduce date type

This commit is contained in:
2017-04-07 23:07:49 +02:00
parent d5c26c6d47
commit edc4889461
4 changed files with 141 additions and 86 deletions

View File

@@ -36,15 +36,6 @@ services:
tags:
- { name: twig.extension }
chill.main.form.type.translatable.string:
class: Chill\MainBundle\Form\Type\TranslatableStringFormType
arguments:
- "%chill_main.available_languages%"
#- "%framework.translator.fallback%"
- "@translator.default"
tags:
- { name: form.type, alias: translatable_string }
chill.main.helper.translatable_string:
class: Chill\MainBundle\Templating\TranslatableStringHelper
arguments:
@@ -70,38 +61,6 @@ services:
tags:
- { name: twig.extension }
chill.main.form.type.select2choice:
class: Chill\MainBundle\Form\Type\Select2ChoiceType
tags:
- {name: form.type, alias: select2_choice}
chill.main.form.type.select2entity:
class: Chill\MainBundle\Form\Type\Select2EntityType
tags:
- {name: form.type, alias: select2_entity }
chill.main.form.type.select2country:
class: Chill\MainBundle\Form\Type\Select2CountryType
arguments:
- "@request_stack"
- "@doctrine.orm.entity_manager"
tags:
- { name: form.type, alias: select2_chill_country }
chill.main.form.type.select2language:
class: Chill\MainBundle\Form\Type\Select2LanguageType
arguments:
- "@request_stack"
- "@doctrine.orm.entity_manager"
tags:
- { name: form.type, alias: select2_chill_language }
chill.main.form.type.center:
class: Chill\MainBundle\Form\Type\CenterType
arguments:
- "@security.token_storage"
- "@chill.main.form.data_transformer.center_transformer"
tags:
- { name: form.type, alias: center }
chill.main.form.data_transformer.center_transformer:
class: Chill\MainBundle\Form\Type\DataTransformer\CenterTransformer
arguments:
@@ -125,14 +84,6 @@ services:
chill.main.role_provider:
class: Chill\MainBundle\Security\RoleProvider
chill.main.form.type.composed_role_scope:
class: Chill\MainBundle\Form\Type\ComposedRoleScopeType
arguments:
- "@chill.main.helper.translatable_string"
- "@chill.main.role_provider"
tags:
- { name: form.type, alias: composed_role_scope }
chill.main.validator.role_scope_scope_presence:
class: Chill\MainBundle\Validation\Validator\RoleScopeScopePresence
arguments:
@@ -141,13 +92,6 @@ services:
- "@translator"
tags:
- { name: validator.constraint_validator, alias: 'role_scope_scope_presence' }
chill.main.form.type.postal_code_type:
class: Chill\MainBundle\Form\Type\PostalCodeType
arguments:
- "@chill.main.helper.translatable_string"
tags:
- { name: form.type }
chill.main.export_manager:
class: Chill\MainBundle\Export\ExportManager
@@ -157,33 +101,3 @@ services:
- "@security.authorization_checker"
- "@chill.main.security.authorization.helper"
- "@security.token_storage"
chill.main.form.type.export:
class: Chill\MainBundle\Form\Type\Export\ExportType
arguments:
- "@chill.main.export_manager"
tags:
- { name: form.type }
chill.main.form.pick_formatter_type:
class: Chill\MainBundle\Form\Type\Export\PickFormatterType
arguments:
- "@chill.main.export_manager"
tags:
- { name: form.type }
chill.main.form.pick_centers_type:
class: Chill\MainBundle\Form\Type\Export\PickCenterType
arguments:
- "@security.token_storage"
- "@chill.main.export_manager"
- "@chill.main.security.authorization.helper"
tags:
- { name: form.type }
chill.main.form.formatter_type:
class: Chill\MainBundle\Form\Type\Export\FormatterType
arguments:
- "@chill.main.export_manager"
tags:
- { name: form.type }

View File

@@ -0,0 +1,93 @@
services:
chill.main.form.type.translatable.string:
class: Chill\MainBundle\Form\Type\TranslatableStringFormType
arguments:
- "%chill_main.available_languages%"
#- "%framework.translator.fallback%"
- "@translator.default"
tags:
- { name: form.type, alias: translatable_string }
chill.main.form.type.select2choice:
class: Chill\MainBundle\Form\Type\Select2ChoiceType
tags:
- {name: form.type, alias: select2_choice}
chill.main.form.type.select2entity:
class: Chill\MainBundle\Form\Type\Select2EntityType
tags:
- {name: form.type, alias: select2_entity }
chill.main.form.type.select2country:
class: Chill\MainBundle\Form\Type\Select2CountryType
arguments:
- "@request_stack"
- "@doctrine.orm.entity_manager"
tags:
- { name: form.type, alias: select2_chill_country }
chill.main.form.type.select2language:
class: Chill\MainBundle\Form\Type\Select2LanguageType
arguments:
- "@request_stack"
- "@doctrine.orm.entity_manager"
tags:
- { name: form.type, alias: select2_chill_language }
chill.main.form.type.center:
class: Chill\MainBundle\Form\Type\CenterType
arguments:
- "@security.token_storage"
- "@chill.main.form.data_transformer.center_transformer"
tags:
- { name: form.type, alias: center }
chill.main.form.type.composed_role_scope:
class: Chill\MainBundle\Form\Type\ComposedRoleScopeType
arguments:
- "@chill.main.helper.translatable_string"
- "@chill.main.role_provider"
tags:
- { name: form.type, alias: composed_role_scope }
chill.main.form.type.postal_code_type:
class: Chill\MainBundle\Form\Type\PostalCodeType
arguments:
- "@chill.main.helper.translatable_string"
tags:
- { name: form.type }
chill.main.form.type.export:
class: Chill\MainBundle\Form\Type\Export\ExportType
arguments:
- "@chill.main.export_manager"
tags:
- { name: form.type }
chill.main.form.pick_formatter_type:
class: Chill\MainBundle\Form\Type\Export\PickFormatterType
arguments:
- "@chill.main.export_manager"
tags:
- { name: form.type }
chill.main.form.pick_centers_type:
class: Chill\MainBundle\Form\Type\Export\PickCenterType
arguments:
- "@security.token_storage"
- "@chill.main.export_manager"
- "@chill.main.security.authorization.helper"
tags:
- { name: form.type }
chill.main.form.formatter_type:
class: Chill\MainBundle\Form\Type\Export\FormatterType
arguments:
- "@chill.main.export_manager"
tags:
- { name: form.type }
chill.main.form.date_type:
class: Chill\MainBundle\Form\Type\ChillDateType
tags:
- { name: form.type }