mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-30 22:16:14 +00:00
add privacyEvent for edit and update singleTask
This commit is contained in:
parent
508e8ae7fb
commit
9c51d673f0
@ -12,4 +12,5 @@ PrivacyEvent branch
|
||||
===================
|
||||
|
||||
- add privacy events to task show / list;
|
||||
- add privacy events to task edit / update;
|
||||
|
||||
|
@ -156,7 +156,7 @@ class SingleTaskController extends Controller
|
||||
|
||||
$event = new PrivacyEvent($person, array(
|
||||
'element_class' => SingleTask::class,
|
||||
'element_id' => intval($id),
|
||||
'element_id' => $task->getId(),
|
||||
'action' => 'show'
|
||||
));
|
||||
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
|
||||
@ -224,6 +224,13 @@ class SingleTaskController extends Controller
|
||||
|
||||
$this->addFlash('success', $translator
|
||||
->trans("The task has been updated"));
|
||||
|
||||
$event = new PrivacyEvent($person, array(
|
||||
'element_class' => SingleTask::class,
|
||||
'element_id' => $task->getId(),
|
||||
'action' => 'update'
|
||||
));
|
||||
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
|
||||
|
||||
return $this->redirectToRoute(
|
||||
'chill_task_singletask_list',
|
||||
@ -240,7 +247,14 @@ class SingleTaskController extends Controller
|
||||
if ($event->hasResponse()) {
|
||||
return $event->getResponse();
|
||||
}
|
||||
|
||||
|
||||
$event = new PrivacyEvent($person, array(
|
||||
'element_class' => SingleTask::class,
|
||||
'element_id' => $task->getId(),
|
||||
'action' => 'edit'
|
||||
));
|
||||
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
|
||||
|
||||
return $this->render('ChillTaskBundle:SingleTask:edit.html.twig', array(
|
||||
'task' => $task,
|
||||
'form' => $form->createView()
|
||||
|
Loading…
x
Reference in New Issue
Block a user