The SSH host key has changed on 8 April, 2022 to this one: SHA256:573uTBSeh74kvOo0HJXi5ijdzRm8me27suzNEDlGyrQ

Moved document related stuff into DocumentController

master
Polonkai Gergely 11 years ago
parent 9f49b70d67
commit 1b55b079f4
  1. 15
      src/KekRozsak/FrontBundle/Controller/DefaultController.php
  2. 25
      src/KekRozsak/FrontBundle/Controller/DocumentController.php
  3. 0
      src/KekRozsak/FrontBundle/Resources/views/Document/documentView.html.twig

@ -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,
);
}
}

@ -0,0 +1,25 @@
<?php
namespace KekRozsak\FrontBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
class DocumentController extends Controller
{
/**
* @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,
);
}
}
Loading…
Cancel
Save