<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use App\Repository\ImagebackgroundRepository;
class AboutController extends AbstractController
{
/**
* @var ImagebackgroundRepository
*/
private $i_repository;
public function __construct(ImagebackgroundRepository $i_repository)
{
$this->i_repository = $i_repository;
}
/**
* @Route("/about", name="about")
* @return Response
*/
public function about(): Response
{
$image = $this->i_repository->find(1);
return $this->render('pages/about.html.twig', [
'current_menu' => 'menu',
'img' => $image
]);
}
}