Merge branch 'features/new-phones' into 'master'

Features/new phones

See merge request Chill-Projet/chill-bundles!5
This commit is contained in:
2021-04-02 12:11:20 +00:00
14 changed files with 502 additions and 123 deletions

View File

@@ -52,25 +52,24 @@ class PersonController extends AbstractController
* @var SimilarPersonMatcher
*/
protected $similarPersonMatcher;
/**
*
* @var TranslatorInterface
*/
protected $translator;
/**
* @var EventDispatcherInterface
*/
protected $eventDispatcher;
/**
*
* @var PersonRepository;
*/
protected $personRepository;
/**
*
* @var ConfigPersonAltNamesHelper
@@ -128,13 +127,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,
@@ -301,7 +300,7 @@ class PersonController extends AbstractController
$r->setStatusCode(400);
return $r;
}
$form = $this->createForm(
//CreationPersonType::NAME,
CreationPersonType::class,
@@ -314,7 +313,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)));