symfony-notifications/NotificationsBundle/Controller/MainController.php

17 lines
539 B
PHP
Raw Normal View History

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 12:49:26 +01:00
use Bluesquare\NotificationsBundle\Service\FooService;
2019-03-01 12:18:06 +01:00
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
class MainController extends AbstractController
{
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:12:17 +01:00
$r = $this->get('bluesquare.notifications_bundle.notifssrv')->foo();
die($r);
2019-03-01 12:18:06 +01:00
}
}