mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
load postal codes dynamically
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
Chill\MainBundle\Entity\PostalCode:
|
||||
type: entity
|
||||
table: chill_main_postal_code
|
||||
repositoryClass: Chill\MainBundle\Repository\PostalCodeRepository
|
||||
indexes:
|
||||
- { name: search_name_code, columns: [ "code", "label" ] }
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
|
@@ -17,6 +17,10 @@ chill_main_admin:
|
||||
chill_main_exports:
|
||||
resource: "@ChillMainBundle/Resources/config/routing/exports.yml"
|
||||
prefix: "{_locale}/exports"
|
||||
|
||||
chill_postal_code:
|
||||
resource: "@ChillMainBundle/Resources/config/routing/postal-code.yml"
|
||||
prefix: "{_locale}/postal-code"
|
||||
|
||||
root:
|
||||
path: /
|
||||
|
4
Resources/config/routing/postal-code.yml
Normal file
4
Resources/config/routing/postal-code.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
chill_main_postal_code_search:
|
||||
path: /search
|
||||
defaults: { _controller: ChillMainBundle:PostalCode:search }
|
||||
|
@@ -1,4 +1,6 @@
|
||||
services:
|
||||
|
||||
Chill\MainBundle\Controller\:
|
||||
autowire: true
|
||||
resource: '../../../Controller'
|
||||
tags: ['controller.service_arguments']
|
||||
|
@@ -54,9 +54,17 @@ services:
|
||||
class: Chill\MainBundle\Form\Type\PostalCodeType
|
||||
arguments:
|
||||
- "@chill.main.helper.translatable_string"
|
||||
- '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
|
||||
- '@chill.main.form.choice_loader.postal_code'
|
||||
- '@Symfony\Component\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
chill.main.form.choice_loader.postal_code:
|
||||
class: Chill\MainBundle\Form\ChoiceLoader\PostalCodeChoiceLoader
|
||||
arguments:
|
||||
- '@Chill\MainBundle\Repository\PostalCodeRepository'
|
||||
|
||||
chill.main.form.type.export:
|
||||
class: Chill\MainBundle\Form\Type\Export\ExportType
|
||||
arguments:
|
||||
|
@@ -15,4 +15,13 @@ services:
|
||||
class: Doctrine\ORM\EntityRepository
|
||||
factory: ["@doctrine.orm.entity_manager", getRepository]
|
||||
arguments:
|
||||
- "Chill\\MainBundle\\Entity\\Scope"
|
||||
- "Chill\\MainBundle\\Entity\\Scope"
|
||||
|
||||
chill.main.postalcode_repository:
|
||||
class: Doctrine\ORM\EntityRepository
|
||||
factory: ["@doctrine.orm.entity_manager", getRepository]
|
||||
arguments:
|
||||
- "Chill\\MainBundle\\Entity\\PostalCode"
|
||||
|
||||
Chill\MainBundle\Repository\PostalCodeRepository: '@chill.main.postalcode_repository'
|
||||
|
Reference in New Issue
Block a user