mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-24 00:23:50 +00:00
delegate person matching detection to service SimilarPersonMatcher
This commit is contained in:
@@ -16,17 +16,6 @@ services:
|
||||
tags:
|
||||
- { name: form.type, alias: closing_motive }
|
||||
|
||||
chill.person.search_person:
|
||||
class: Chill\PersonBundle\Search\PersonSearch
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- "@security.token_storage"
|
||||
- "@chill.main.security.authorization.helper"
|
||||
- "@chill_main.paginator_factory"
|
||||
calls:
|
||||
- ['setContainer', ["@service_container"]]
|
||||
tags:
|
||||
- { name: chill.search, alias: 'person_regular' }
|
||||
chill.person.form.type.select2maritalstatus:
|
||||
class: Chill\PersonBundle\Form\Type\Select2MaritalStatusType
|
||||
arguments:
|
||||
|
5
Resources/config/services/controller.yml
Normal file
5
Resources/config/services/controller.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
services:
|
||||
Chill\PersonBundle\Controller\PersonController:
|
||||
arguments:
|
||||
$similarPersonMatcher: '@Chill\PersonBundle\Search\SimilarPersonMatcher'
|
||||
tags: ['controller.service_arguments']
|
18
Resources/config/services/search.yml
Normal file
18
Resources/config/services/search.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
services:
|
||||
chill.person.search_person:
|
||||
class: Chill\PersonBundle\Search\PersonSearch
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- "@security.token_storage"
|
||||
- "@chill.main.security.authorization.helper"
|
||||
- "@chill_main.paginator_factory"
|
||||
calls:
|
||||
- ['setContainer', ["@service_container"]]
|
||||
tags:
|
||||
- { name: chill.search, alias: 'person_regular' }
|
||||
|
||||
Chill\PersonBundle\Search\SimilarPersonMatcher:
|
||||
arguments:
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
||||
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
|
Reference in New Issue
Block a user