2019-03-01 12:18:06 +01:00
|
|
|
<?php
|
|
|
|
|
2019-03-01 12:49:26 +01:00
|
|
|
namespace Bluesquare\NotificationsBundle\Controller;
|
2019-03-01 12:18:06 +01:00
|
|
|
|
2019-03-01 13:19:12 +01:00
|
|
|
use Bluesquare\NotificationsBundle\Service\NotificationsService;
|
2019-03-01 12:18:06 +01:00
|
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
|
|
use Symfony\Component\HttpFoundation\Request;
|
|
|
|
|
|
|
|
class MainController extends AbstractController
|
|
|
|
{
|
2019-03-01 13:19:12 +01:00
|
|
|
/**
|
|
|
|
* @param Request $request
|
|
|
|
*/
|
2019-03-01 12:18:06 +01:00
|
|
|
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 :
|
2019-03-01 13:19:12 +01:00
|
|
|
/** @var NotificationsService $notifssrv */
|
|
|
|
$notifssrv = $this->get('bluesquare.notifications_bundle.notifssrv');
|
|
|
|
$r = $notifssrv->notifyUsers();
|
2019-03-01 13:12:17 +01:00
|
|
|
die($r);
|
2019-03-01 12:18:06 +01:00
|
|
|
}
|
|
|
|
}
|