From 99371d95213fdd771a99cc55273e72343ebb065a Mon Sep 17 00:00:00 2001 From: Kevin Frantz Date: Thu, 6 Sep 2018 08:46:49 +0200 Subject: [PATCH] Implemented template dummys --- .../src/Controller/DefaultController.php | 4 --- application/src/Controller/UserController.php | 25 ++++++++++++++++--- .../unit/Controller/UserControllerTest.php | 4 +-- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/application/src/Controller/DefaultController.php b/application/src/Controller/DefaultController.php index 6c6bf52..bdf8718 100644 --- a/application/src/Controller/DefaultController.php +++ b/application/src/Controller/DefaultController.php @@ -13,8 +13,6 @@ use Symfony\Component\HttpFoundation\Response; class DefaultController extends AbstractController implements DefaultControllerInterface { /** - * Matches / - * * @Route("/imprint", name="imprint") */ public function imprint(): Response @@ -23,8 +21,6 @@ class DefaultController extends AbstractController implements DefaultControllerI } /** - * Matches / - * * @Route("/", name="homepage") */ public function homepage(): Response diff --git a/application/src/Controller/UserController.php b/application/src/Controller/UserController.php index 566a91f..b17cc80 100644 --- a/application/src/Controller/UserController.php +++ b/application/src/Controller/UserController.php @@ -2,21 +2,38 @@ namespace App\Controller; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\Annotation\Route; +use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; /** * * @author kevinfrantz * */ -class UserController implements UserControllerInterface +class UserController extends AbstractController implements UserControllerInterface { + /** + * @Route("/user/logout", name="user_logout") + */ public function logout(): Response - {} + { + return $this->render("user/login.html.twig",['menu_items'=>[]]); + } + /** + * @Route("/user/login", name="user_login") + */ public function login(): Response - {} + { + return $this->render("user/login.html.twig",['menu_items'=>[]]); + } + /** + * @Route("/user/register", name="user_register") + */ public function register(): Response - {} + { + return $this->render("user/register.html.twig",['menu_items'=>[]]); + } } \ No newline at end of file diff --git a/application/tests/unit/Controller/UserControllerTest.php b/application/tests/unit/Controller/UserControllerTest.php index 2aea794..80b5ecc 100644 --- a/application/tests/unit/Controller/UserControllerTest.php +++ b/application/tests/unit/Controller/UserControllerTest.php @@ -1,16 +1,16 @@