mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-09 06:49:41 +00:00
Set type upon creation of automatic notifications
This commit is contained in:
@@ -12,6 +12,7 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Workflow\EventSubscriber;
|
||||
|
||||
use Chill\MainBundle\Entity\Notification;
|
||||
use Chill\MainBundle\Entity\NotificationEnum;
|
||||
use Chill\MainBundle\Entity\User;
|
||||
use Chill\MainBundle\Entity\UserGroup;
|
||||
use Chill\MainBundle\Entity\Workflow\EntityWorkflow;
|
||||
@@ -125,7 +126,8 @@ class NotificationOnTransition implements EventSubscriberInterface
|
||||
->setRelatedEntityClass(EntityWorkflow::class)
|
||||
->setTitle($this->engine->render('@ChillMain/Workflow/workflow_notification_on_transition_completed_title.fr.txt.twig', $context))
|
||||
->setMessage($this->engine->render('@ChillMain/Workflow/workflow_notification_on_transition_completed_content.fr.txt.twig', $context))
|
||||
->addAddressee($subscriber);
|
||||
->addAddressee($subscriber)
|
||||
->setType(NotificationEnum::WORKFLOW_TRANS);
|
||||
$this->entityManager->persist($notification);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user