Add other phone number

This commit is contained in:
Jean-Francois Monfort
2021-03-25 15:04:59 +01:00
parent ff5c1c1b5a
commit 50d686f086
8 changed files with 345 additions and 47 deletions

View File

@@ -51,25 +51,24 @@ class PersonController extends AbstractController
* @var SimilarPersonMatcher
*/
protected $similarPersonMatcher;
/**
*
* @var TranslatorInterface
*/
protected $translator;
/**
* @var EventDispatcherInterface
*/
protected $eventDispatcher;
/**
*
* @var PersonRepository;
*/
protected $personRepository;
/**
*
* @var ConfigPersonAltNamesHelper
@@ -120,13 +119,13 @@ class PersonController extends AbstractController
throw $this->createNotFoundException("Person with id $person_id not"
. " found on this server");
}
$this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person,
"You are not allowed to see this person.");
$event = new PrivacyEvent($person);
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
return $this->render('ChillPersonBundle:Person:view.html.twig',
array(
"person" => $person,
@@ -293,7 +292,7 @@ class PersonController extends AbstractController
$r->setStatusCode(400);
return $r;
}
$form = $this->createForm(
//CreationPersonType::NAME,
CreationPersonType::class,
@@ -306,7 +305,7 @@ class PersonController extends AbstractController
$form->handleRequest($request);
$person = $this->_bindCreationForm($form);
$errors = $this->_validatePersonAndAccompanyingPeriod($person);
$this->logger->info(sprintf('Person created with %d errors ', count($errors)));