diff --git a/src/KekRozsak/FrontBundle/Controller/DefaultController.php b/src/KekRozsak/FrontBundle/Controller/DefaultController.php index 159f8da..ca1a845 100644 --- a/src/KekRozsak/FrontBundle/Controller/DefaultController.php +++ b/src/KekRozsak/FrontBundle/Controller/DefaultController.php @@ -77,19 +77,4 @@ class DefaultController extends Controller 'saveSuccess' => $saveSuccess, ); } - - /** - * @Route("/dokumentum/{documentSlug}", name="KekRozsakFrontBundle_documentView") - * @Template() - */ - public function documentViewAction($documentSlug) - { - $docRepo = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Document'); - if (!($document = $docRepo->findOneBySlug($documentSlug))) - throw $this->createNotFoundException('A kért dokumentum nem létezik!'); - - return array( - 'document' => $document, - ); - } } diff --git a/src/KekRozsak/FrontBundle/Controller/DocumentController.php b/src/KekRozsak/FrontBundle/Controller/DocumentController.php new file mode 100644 index 0000000..48ac6c0 --- /dev/null +++ b/src/KekRozsak/FrontBundle/Controller/DocumentController.php @@ -0,0 +1,25 @@ +getDoctrine()->getRepository('KekRozsakFrontBundle:Document'); + if (!($document = $docRepo->findOneBySlug($documentSlug))) + throw $this->createNotFoundException('A kért dokumentum nem létezik!'); + + return array( + 'document' => $document, + ); + } +} diff --git a/src/KekRozsak/FrontBundle/Resources/views/Default/documentView.html.twig b/src/KekRozsak/FrontBundle/Resources/views/Document/documentView.html.twig similarity index 100% rename from src/KekRozsak/FrontBundle/Resources/views/Default/documentView.html.twig rename to src/KekRozsak/FrontBundle/Resources/views/Document/documentView.html.twig