<?php
namespace App\Controller;
use App\Entity\Main\Page;
use App\Repository\Main\PageRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class ProtectionOfPersonalDataController extends AbstractController
{
/**
* @Route("/kisisel-verilerin-korunmasi-kanunu", name="protection_of_personal_data")
*/
public function index(Request $request, PageRepository $repository): Response
{
/** @var Page $page */
$page = $repository->findOneBy([
'name' => 'protection-of-personal-data',
'locale' => $request->getLocale(),
]);
return $this->render('protection_of_personal_data/index.html.twig', [
'content' => $page->getContent(),
]);
}
}