create imprint

This commit is contained in:
Jannis Portmann 2021-06-06 10:38:32 +02:00
parent 4aeb6aa8a3
commit 0ed1eef5ff
2 changed files with 240 additions and 10 deletions

View file

@ -2,9 +2,6 @@
namespace App\Controller;
use App\Repository\OfferingRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@ -13,16 +10,15 @@ use Twig\Environment;
class AppController extends AbstractController
{
private $entityManager;
public function __construct(EntityManagerInterface $entityManager)
#[Route('/', name: 'homepage')]
public function index(): Response
{
$this->entityManager = $entityManager;
return $this->render('app/index.html.twig');
}
#[Route('/', name: 'homepage')]
public function index(Environment $twig, OfferingRepository $offerRepository): Response
#[Route('/imprint', name: 'imprint')]
public function imprint(): Response
{
return new Response($twig->render('app/index.html.twig'));
return $this->render('app/imprint.html.twig');
}
}