Created the article viewer

Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
Polonkai Gergely
2012-07-01 19:11:31 +02:00
parent 2bca134a79
commit 95152ca62b
9 changed files with 713 additions and 55 deletions

View File

@@ -6,8 +6,12 @@ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
public function articleAction($articleSlug)
{
return $this->render('KekRozsakFrontBundle:Default:article.html.twig', array());
}
public function articleAction($articleSlug)
{
$article = $this->getDoctrine()->getRepository('KekRozsakFrontBundle:Article')->findOneBySlug($articleSlug);
return $this->render('KekRozsakFrontBundle:Default:article.html.twig', array(
'article' => $article
));
}
}