mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
Use repositories as services.
This commit is contained in:
@@ -19,6 +19,7 @@ use Symfony\Component\Translation\TranslatorInterface;
|
||||
use Chill\ActivityBundle\Entity\Activity;
|
||||
use Chill\DocStoreBundle\Entity\PersonDocument;
|
||||
use Chill\EventBundle\Entity\Participation;
|
||||
use Chill\PersonBundle\Repository\PersonNotDuplicateRepository;
|
||||
use Chill\TaskBundle\Entity\SingleTask;
|
||||
|
||||
class PersonDuplicateController extends Controller
|
||||
@@ -62,7 +63,7 @@ class PersonDuplicateController extends Controller
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
}
|
||||
|
||||
public function viewAction($person_id)
|
||||
public function viewAction($person_id, PersonNotDuplicateRepository $personNotDuplicateRepository)
|
||||
{
|
||||
$person = $this->_getPerson($person_id);
|
||||
if ($person === null) {
|
||||
@@ -76,8 +77,7 @@ class PersonDuplicateController extends Controller
|
||||
$duplicatePersons = $this->similarPersonMatcher->
|
||||
matchPerson($person, 0.5, SimilarPersonMatcher::SIMILAR_SEARCH_ORDER_BY_ALPHABETICAL);
|
||||
|
||||
$notDuplicatePersons = $this->getDoctrine()->getRepository(PersonNotDuplicate::class)
|
||||
->findNotDuplicatePerson($person);
|
||||
$notDuplicatePersons = $personNotDuplicateRepository->findNotDuplicatePerson($person);
|
||||
|
||||
return $this->render('ChillPersonBundle:PersonDuplicate:view.html.twig', [
|
||||
'person' => $person,
|
||||
|
Reference in New Issue
Block a user