src/Controller/DefaultController.php line 24

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Entity\Pages;
  4. use App\Exceptions\ApiException;
  5. use App\Logic\PageLogic;
  6. use App\Logic\Wirecard\WirecardAPI;
  7. use App\Repository\UserRepository;
  8. use App\Repository\WirecardTransactionRepository;
  9. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  10. use Symfony\Component\HttpFoundation\RedirectResponse;
  11. use Symfony\Component\HttpFoundation\Response;
  12. use Symfony\Component\Routing\Annotation\Route;
  13. class DefaultController extends AbstractController
  14. {
  15.     /**
  16.      * @Route("/", name="homepage")
  17.      */
  18.     public function index(): Response
  19.     {
  20.         return $this->render('pages/homepage.html.twig',[
  21.             'page' => null
  22.         ]);
  23.     }
  24.     /**
  25.      * @Route("/rules", name="rules")
  26.      */
  27.     public function rules(PageLogic $pageLogic)
  28.     {
  29.         $user $this->getUser();
  30.         return $this->render('pages/rules.html.twig',[
  31.             'page' => $pageLogic->getRulesPage()
  32.         ]);
  33.     }
  34.     /**
  35.      * @Route("/how-add-shortcut", name="shortcut")
  36.      */
  37.     public function shortcut(PageLogic $pageLogic)
  38.     {
  39.         $user $this->getUser();
  40.         return $this->render('pages/rules.html.twig',[
  41.             'page' => $pageLogic->getHowToAddShortcut()
  42.         ]);
  43.     }
  44.     /**
  45.      * @Route("/promotions", name="promotions")
  46.      */
  47.     public function promotions(PageLogic $pageLogic)
  48.     {
  49.         $user $this->getUser();
  50.         return $this->render('pages/promotions.html.twig',[
  51.             'page' => $pageLogic->getPromotionsPage()
  52.         ]);
  53.     }
  54. }