src/Controller/ProductionQualityController.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 ProductionQualityController extends AbstractController
  10. {
  11.     /**
  12.      * @Route("/uretim-kalite", name="production_quality")
  13.      */
  14.     public function index(Request $requestPageRepository $repository): Response
  15.     {
  16.         /** @var Page $page */
  17.         $page $repository->findOneBy([
  18.             'locale' => $request->getLocale(),
  19.             'name' => 'production-quality',
  20.         ]);
  21.         return $this->render('production_quality/index.html.twig', [
  22.             'content' => $page->getContent(),
  23.         ]);
  24.     }
  25. }