diff --git a/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php b/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php new file mode 100644 index 0000000..06e5268 --- /dev/null +++ b/src/Skobkin/Bundle/PointToolsBundle/Controller/UserController.php @@ -0,0 +1,26 @@ +render('SkobkinPointToolsBundle:User:show.html.twig', []); + } + + public function topAction() + { + /** @var EntityManager $em */ + $em = $this->getDoctrine()->getManager(); + + /** @var QueryBuilder $qb */ + $qb = $em->getRepository('SkobkinPointToolsBundle:Subscription')->createQueryBuilder('us'); + + + } +} diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/routing.yml b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/routing.yml index 7bb42eb..2e4f28b 100644 --- a/src/Skobkin/Bundle/PointToolsBundle/Resources/config/routing.yml +++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/config/routing.yml @@ -1,3 +1,11 @@ index: path: / defaults: { _controller: SkobkinPointToolsBundle:Main:index } + +user_show: + path: /user/{login} + defaults: { _controller: SkobkinPointToolsBundle:User:show } + +users_top: + path: /top + defaults: { _controller: SkobkinPointToolsBundle:User:top } \ No newline at end of file diff --git a/src/Skobkin/Bundle/PointToolsBundle/Resources/views/User/show.html.twig b/src/Skobkin/Bundle/PointToolsBundle/Resources/views/User/show.html.twig new file mode 100644 index 0000000..cc43ab9 --- /dev/null +++ b/src/Skobkin/Bundle/PointToolsBundle/Resources/views/User/show.html.twig @@ -0,0 +1,7 @@ +{% extends "::base.html.twig" %} + +{% block title %}SkobkinPointToolsBundle:User:show{% endblock %} + +{% block body %} +

Welcome to the User:show page

+{% endblock %} diff --git a/src/Skobkin/Bundle/PointToolsBundle/Tests/Controller/UserControllerTest.php b/src/Skobkin/Bundle/PointToolsBundle/Tests/Controller/UserControllerTest.php new file mode 100644 index 0000000..2b0dad8 --- /dev/null +++ b/src/Skobkin/Bundle/PointToolsBundle/Tests/Controller/UserControllerTest.php @@ -0,0 +1,16 @@ +request('GET', '/user/{login}'); + } + +}