diff --git a/NotificationsBundle/Controller/MainController.php b/NotificationsBundle/Controller/MainController.php index 7c0d7e1..4bca047 100644 --- a/NotificationsBundle/Controller/MainController.php +++ b/NotificationsBundle/Controller/MainController.php @@ -2,16 +2,21 @@ namespace Bluesquare\NotificationsBundle\Controller; -use Bluesquare\NotificationsBundle\Service\FooService; +use Bluesquare\NotificationsBundle\Service\NotificationsService; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\HttpFoundation\Request; class MainController extends AbstractController { + /** + * @param Request $request + */ public function index(Request $request) { // ON PEUT PAS INJECTER UN SERVICE DU BUNDLE EN QUESTION DANS LES ARGS DONC ON LE récupère ainsi : - $r = $this->get('bluesquare.notifications_bundle.notifssrv')->foo(); + /** @var NotificationsService $notifssrv */ + $notifssrv = $this->get('bluesquare.notifications_bundle.notifssrv'); + $r = $notifssrv->notifyUsers(); die($r); } } \ No newline at end of file diff --git a/NotificationsBundle/Entity/BillingInvoice.php b/NotificationsBundle/Entity/BillingInvoice.php index 9826b48..6dbb58a 100644 --- a/NotificationsBundle/Entity/BillingInvoice.php +++ b/NotificationsBundle/Entity/BillingInvoice.php @@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="Bluesquare\NotificationsBundle\Repository\BillingInvoiceRepository") */ -class BillingInvoice +class Notification { /** * @ORM\Id() @@ -17,24 +17,22 @@ class BillingInvoice private $id; /** - * @ORM\Column(type="string", length=255) + * @ORM\Column(type="string", length=191) */ - private $azerty; + private $title; - public function getId(): ?int - { - return $this->id; - } + /** + * @ORM\Column(type="string", length=191) + */ + private $data; - public function getAzerty(): ?string - { - return $this->azerty; - } + /** + * @ORM\Column(type="string", length=191) + */ + private $description; - public function setAzerty(string $azerty): self - { - $this->azerty = $azerty; - - return $this; - } + /** + * @ORM\ManyToOne(targetEntity="User") + */ + private $user; }