2019-11-05 12:16:16 +01:00
|
|
|
<?php
|
|
|
|
|
2020-01-30 11:28:24 +01:00
|
|
|
namespace App\Controller;
|
2020-01-28 20:43:16 +01:00
|
|
|
|
2020-10-26 11:39:04 +01:00
|
|
|
use App\Entity\Poll;
|
2020-01-30 11:28:24 +01:00
|
|
|
use FOS\RestBundle\Controller\Annotations\Get;
|
|
|
|
use FOS\RestBundle\Controller\Annotations\Route;
|
2020-04-17 12:04:37 +02:00
|
|
|
use Symfony\Component\Mailer\Exception\TransportExceptionInterface;
|
2020-01-28 20:43:16 +01:00
|
|
|
|
2020-01-30 11:28:24 +01:00
|
|
|
/**
|
|
|
|
* Class DefaultController
|
|
|
|
* @package App\Controller
|
2021-02-12 15:53:28 +01:00
|
|
|
* @Route("/",name="home_")
|
2020-01-30 11:28:24 +01:00
|
|
|
*/
|
2021-04-21 11:02:24 +02:00
|
|
|
class DefaultController extends EmailsController {
|
2020-01-28 20:43:16 +01:00
|
|
|
|
2020-10-26 11:39:04 +01:00
|
|
|
/**
|
|
|
|
* @Get(path ="/",
|
2021-02-12 15:53:28 +01:00
|
|
|
* name = "sweet_home")
|
2020-10-26 11:39:04 +01:00
|
|
|
*/
|
|
|
|
public function indexAction() {
|
|
|
|
|
|
|
|
$polls = $this->getDoctrine()->getRepository( Poll::class )->findAll();
|
|
|
|
|
2021-04-21 11:02:24 +02:00
|
|
|
return $this->render( 'pages/home.html.twig', [] );
|
2020-10-26 11:39:04 +01:00
|
|
|
}
|
2020-01-28 20:43:16 +01:00
|
|
|
|
2019-11-12 11:44:09 +01:00
|
|
|
|
2020-01-30 11:28:24 +01:00
|
|
|
}
|