src/Controller/ProtectionOfPersonalDataController.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Main\Page;
  4. use App\Repository\Main\PageRepository;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Request;
  7. use Symfony\Component\HttpFoundation\Response;
  8. use Symfony\Component\Routing\Annotation\Route;
  9. class ProtectionOfPersonalDataController extends AbstractController
  10. {
  11.     /**
  12.      * @Route("/kisisel-verilerin-korunmasi-kanunu", name="protection_of_personal_data")
  13.      */
  14.     public function index(Request $requestPageRepository $repository): Response
  15.     {
  16.         /** @var Page $page */
  17.         $page $repository->findOneBy([
  18.             'name' => 'protection-of-personal-data',
  19.             'locale' => $request->getLocale(),
  20.         ]);
  21.         return $this->render('protection_of_personal_data/index.html.twig', [
  22.             'content' => $page->getContent(),
  23.         ]);
  24.     }
  25. }