add forgotten entity manager

This commit is contained in:
Jannis Portmann 2021-05-04 11:52:51 +02:00
parent f2dd4da50b
commit b190f94213

View file

@ -7,6 +7,7 @@ use App\Form\OfferingFormType;
use App\Repository\OfferingRepository;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@ -15,6 +16,13 @@ use Twig\Environment;
class OfferController extends AbstractController
{
private $entityManager;
public function __construct(EntityManagerInterface $entityManager)
{
$this->entityManager = $entityManager;
}
#[Route('/', name: 'homepage')]
public function index(Environment $twig, OfferingRepository $offeringRepository): Response
{