public function addNotification($recipientId, $title, $content, $template, $templateVars, $importance, $sendImmediately)
    {
        $notification = new Notification();
        $notification->setRecipientId($recipientId);
        $notification->setTitle($title);
        $notification->setContent($content);
        $notification->setTemplate($template);
        $notification->setImportance($importance);
        $notification->setSendImmediately($sendImmediately);
        $notification->setVariables($templateVars);
        $this->managerRegistry->getManager()->persist($notification);
        $this->managerRegistry->getManager()->flush($notification);

        return $notification;
    }