mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
write privacy event only if person is available #3
This commit is contained in:
parent
73ef9e1f8e
commit
9024f0cfca
@ -540,11 +540,13 @@ class SingleTaskController extends Controller
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
||||
$event = new PrivacyEvent($person, array(
|
||||
'element_class' => SingleTask::class,
|
||||
'action' => 'list'
|
||||
));
|
||||
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
|
||||
if (isset($person)) {
|
||||
$event = new PrivacyEvent($person, array(
|
||||
'element_class' => SingleTask::class,
|
||||
'action' => 'list'
|
||||
));
|
||||
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
|
||||
}
|
||||
|
||||
return $this->render('ChillTaskBundle:SingleTask:index.html.twig',
|
||||
\array_merge($viewParams, [ 'form' => $form->createView() ]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user