src/Controller/GamesController.php line 97

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. use MobileDetectBundle\DeviceDetector\MobileDetectorInterface;
  7. /**
  8. * @Route("/jeux")
  9. */
  10. class GamesController extends AbstractController
  11. {
  12. /**
  13. * @Route("/", name="jeux")
  14. */
  15. public function jeux(MobileDetectorInterface $mobileDetector): Response
  16. {
  17. if ($mobileDetector->isMobile()) {
  18. return $this->render('games/jeux.html.twig');
  19. } else {
  20. return $this->render('games/jeux.html.twig');
  21. }
  22. }
  23. /**
  24. * @Route("/memory", name="memory")
  25. */
  26. public function memory(MobileDetectorInterface $mobileDetector): Response
  27. {
  28. if ($mobileDetector->isMobile()) {
  29. return $this->render('games/memory.html.twig');
  30. } else {
  31. return $this->render('games/memory.html.twig');
  32. }
  33. }
  34. /**
  35. * @Route("/coloriage", name="coloriage")
  36. */
  37. public function coloriage(MobileDetectorInterface $mobileDetector): Response
  38. {
  39. if ($mobileDetector->isMobile()) {
  40. return $this->render('games/coloriage.html.twig');
  41. } else {
  42. return $this->render('games/coloriage.html.twig');
  43. }
  44. }
  45. /**
  46. * @Route("/papertoys", name="papertoys")
  47. */
  48. public function papertoys(MobileDetectorInterface $mobileDetector): Response
  49. {
  50. if ($mobileDetector->isMobile()) {
  51. return $this->render('games/papertoys.html.twig');
  52. } else {
  53. return $this->render('games/papertoys.html.twig');
  54. }
  55. }
  56. /**
  57. * @Route("/attrappitch", name="attrappitch")
  58. */
  59. public function attrappitch(MobileDetectorInterface $mobileDetector): Response
  60. {
  61. if ($mobileDetector->isMobile()) {
  62. return $this->render('games/attrappitch.html.twig');
  63. } else {
  64. return $this->render('games/attrappitch.html.twig');
  65. }
  66. }
  67. /**
  68. * @Route("/pitchabulaire", name="pitchabulaire")
  69. */
  70. public function pitchabulaire(MobileDetectorInterface $mobileDetector): Response
  71. {
  72. if ($mobileDetector->isMobile()) {
  73. return $this->render('games/pitchabulaire.html.twig');
  74. } else {
  75. return $this->render('games/pitchabulaire.html.twig');
  76. }
  77. }
  78. /**
  79. * @Route("/marathon", name="marathon")
  80. */
  81. public function marathon(): Response
  82. {
  83. return $this->render('games/marathon.html.twig');
  84. }
  85. /**
  86. * @Route("/tour-du-monde", name="tdm")
  87. */
  88. public function tdm(): Response
  89. {
  90. return $this->render('games/tdm.html.twig');
  91. }
  92. /**
  93. * @Route("/tour-du-monde/{pays}", name="tdm-pays")
  94. */
  95. public function tdmPays($pays): Response
  96. {
  97. return $this->render('games/tdm/'.$pays.'.html.twig');
  98. }
  99. /**
  100. * @Route("/tour-du-monde/{pays}/jeu", name="tdm-pays-jeu")
  101. */
  102. public function tdmPaysJeu($pays): Response
  103. {
  104. return $this->render('games/tdm/'.$pays.'-jeu.html.twig');
  105. }
  106. /**
  107. * @Route("/solutions-des-petits-jeux", name="solutions")
  108. */
  109. public function solutions(): Response
  110. {
  111. return $this->render('games/solutions.html.twig');
  112. }
  113. /**
  114. * @Route("/souvenirs", name="souvenirs")
  115. */
  116. public function souvenirs(): Response
  117. {
  118. return $this->render('games/souvenirs.html.twig');
  119. }
  120. /**
  121. * @Route("/souvenirs/{jeu}", name="souvenirs-jeu")
  122. */
  123. public function souvenirsJeu($jeu): Response
  124. {
  125. return $this->render('games/souvenirs/'.$jeu.'.html.twig');
  126. }
  127. }