<?php
namespace JF\JuridicusBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use JMS\DiExtraBundle\Annotation as DI;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use JF\JuridicusBundle\Entity\Faq;
/**
* Faq controller.
*
*/
class FaqController extends AbstractController
{
/** @DI\Inject("doctrine.orm.entity_manager") */
private $em;
/**
* Lists all Faq entities.
* @Route("/faq.html", name="faq")
*/
public function indexAction()
{
$em = $this->getDoctrine()->getManager();
$request = $this->container->get('request_stack')->getCurrentRequest();
$entities = $em->getRepository(Faq::class)->findBy(array(), array('sortierung' => 'ASC'));
$replacements = array(
'host' => $request->getHost()
);
return $this->render("@JFJuridicusBundle/Faq/index.html.twig", array(
'entities' => $entities,
'replacements' => $replacements
));
}
}