src/PHPDish/Bundle/NotificationBundle/Service/NotificationManager.php
public function sendNotification($participants, NotificationInterface $notification, $send = false)
    {
        foreach ($participants as $participant) {
            $metadata = new $this->metadataEntity();
            $metadata->setParticipant($participant);
            $notification->addMetadata($metadata);
        }
        $this->entityManager->persist($notification);
        $send && $this->entityManager->flush();
    }
public function sendNotification($participants, NotificationInterface $notification, $send = false)
    {
        foreach ($participants as $participant) {
            $metadata = new $this->metadataEntity();
            $metadata->setParticipant($participant);
            $notification->addMetadata($metadata);
        }
        $this->entityManager->persist($notification);
        $send && $this->entityManager->flush();
    }
{@inheritdoc}