src/Controller/Map/ShowMapAction.php line 13

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Slivki\Controller\Map;
  4. use Slivki\Util\CommonUtil;
  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. final class ShowMapAction extends AbstractController
  10. {
  11.     /**
  12.      * @Route("/map", methods={"GET"}, name="map")
  13.      */
  14.     public function __invoke(Request $request): Response
  15.     {
  16.         return $this->render(CommonUtil::isMobileDevice($request)
  17.             ? 'Slivki/mobile/map/map.html.twig'
  18.             'Slivki/map/map.html.twig');
  19.     }
  20. }