mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-07-01 06:26:15 +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 show / list;
|
||||||
|
- add privacy events to task edit / update;
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ class SingleTaskController extends Controller
|
|||||||
|
|
||||||
$event = new PrivacyEvent($person, array(
|
$event = new PrivacyEvent($person, array(
|
||||||
'element_class' => SingleTask::class,
|
'element_class' => SingleTask::class,
|
||||||
'element_id' => intval($id),
|
'element_id' => $task->getId(),
|
||||||
'action' => 'show'
|
'action' => 'show'
|
||||||
));
|
));
|
||||||
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
|
$this->eventDispatcher->dispatch(PrivacyEvent::PERSON_PRIVACY_EVENT, $event);
|
||||||
@ -225,6 +225,13 @@ class SingleTaskController extends Controller
|
|||||||
$this->addFlash('success', $translator
|
$this->addFlash('success', $translator
|
||||||
->trans("The task has been updated"));
|
->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(
|
return $this->redirectToRoute(
|
||||||
'chill_task_singletask_list',
|
'chill_task_singletask_list',
|
||||||
$request->query->get('list_params', [])
|
$request->query->get('list_params', [])
|
||||||
@ -241,6 +248,13 @@ class SingleTaskController extends Controller
|
|||||||
return $event->getResponse();
|
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(
|
return $this->render('ChillTaskBundle:SingleTask:edit.html.twig', array(
|
||||||
'task' => $task,
|
'task' => $task,
|
||||||
'form' => $form->createView()
|
'form' => $form->createView()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user