Example #1
0
 public function createNew(string $endpoint, string $title, string $description, string $url, string $image)
 {
     $notification = new Notification();
     $notification->setEndpoint($endpoint);
     $notification->setTitle($title);
     $notification->setDescription($description);
     $notification->setUrl($url);
     $notification->setImage($image);
     $this->entityManager->persist($notification);
     $this->entityManager->flush();
     return $notification;
 }
Example #2
0
 public function getDomainModel(\TubeService\Data\Database\Entity\Notification $item) : Notification
 {
     $id = new ID($item->getID());
     $image = new Notification($id, $item->getCreatedAt(), $item->getUpdatedAt(), $item->getEndpoint(), $item->getTitle(), $item->getDescription(), $item->getUrl(), $item->getImage());
     return $image;
 }