<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use App\Repository\OngletRepository;
use App\Repository\NotificationRepository;
use App\Repository\WebsocketMessageRepository;
use App\Service\NotificationService;
use App\Service\MineService;
class ParentController extends AbstractController {
/**
* @Route("/", name="parent", options={"label"="Base application"})
*/
public function parent(Request $request,
OngletRepository $repo_onglet, WebsocketMessageRepository $repo_mess,
NotificationService $serv_notif, MineService $serv_res) {
$user = $this->getUser();
$mine = $serv_res->getMineContext($user);
$ongletsToOpen = $repo_onglet->findByUser($user);
$tabNotifs = $serv_notif->getAllByResAndUser($mine, $user);
return $this->render('base.html.twig', [
'onglets' => $ongletsToOpen,
'notifs' => $tabNotifs
]);
}// function
}// class
?>