Created the article viewer
Signed-off-by: Gergely POLONKAI (W00d5t0ck) <polesz@w00d5t0ck.info>
This commit is contained in:
@@ -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
|
||||
));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user