Feature: send notification on ccuser for workflows

This commit is contained in:
nobohan 2023-03-21 20:14:11 +01:00
parent 2b3d7f34fc
commit 1789a75216
2 changed files with 7 additions and 1 deletions

View File

@ -50,6 +50,10 @@ class EntityWorkflowTransitionEventSubscriber implements EventSubscriberInterfac
/** @var EntityWorkflow $entityWorkflow */
$entityWorkflow = $event->getSubject();
foreach ($entityWorkflow->futureCcUsers as $user) {
$entityWorkflow->getCurrentStep()->addCcUser($user);
}
foreach ($entityWorkflow->futureDestUsers as $user) {
$entityWorkflow->getCurrentStep()->addDestUser($user);
}

View File

@ -85,7 +85,9 @@ class NotificationOnTransition implements EventSubscriberInterface
// the subscriber to final, only if final
$entityWorkflow->isFinal() ? $entityWorkflow->getSubscriberToFinal()->toArray() : [],
// the dests for the current step
$entityWorkflow->getCurrentStep()->getDestUser()->toArray()
$entityWorkflow->getCurrentStep()->getDestUser()->toArray(),
// the cc users for the current step
$entityWorkflow->getCurrentStep()->getCcUser()->toArray()
) as $dest) {
$dests[spl_object_hash($dest)] = $dest;
}