delegate person matching detection to service SimilarPersonMatcher

This commit is contained in:
2018-05-14 17:58:00 +02:00
parent db00a0d265
commit 983ed7a50d
6 changed files with 128 additions and 40 deletions

View File

@@ -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:

View File

@@ -0,0 +1,5 @@
services:
Chill\PersonBundle\Controller\PersonController:
arguments:
$similarPersonMatcher: '@Chill\PersonBundle\Search\SimilarPersonMatcher'
tags: ['controller.service_arguments']

View 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'