The notification business logic

The whole idea for notifications is for them to be generated automatically by the system. This means that for most of db queries, the system should generate a notification automatically and alert the user(s) who are involved to that event.

The Notifications class concerns users only, so the basic properties for the Notification entity would be as follows:

<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Notification * @ORM\Table(name="notification") * @ORM\Entity(repositoryClass= "AppBundle\Entity\NotificatioRepository") */ class Notification { /** * @var integer * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * @ORM\Column(name="subject", ...

Get Mastering Symfony now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.