<?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 SocialResponsibilityController extends AbstractController
{
/**
* @Route("/sosyal-sorumluluk-politikasi", name="social_responsibility")
*/
public function index(Request $request, PageRepository $repository): Response
{
/** @var Page $page */
$page = $repository->findOneBy([
'locale' => $request->getLocale(),
'name' => 'social-responsibility'
]);
return $this->render('social_responsibility/index.html.twig', [
'content' => $page->getContent(),
]);
}
}