src/JuridicusBundle/Controller/FaqController.php line 25

Open in your IDE?
  1. <?php
  2. namespace JF\JuridicusBundle\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use JMS\DiExtraBundle\Annotation as DI;
  5. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
  6. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  7. use JF\JuridicusBundle\Entity\Faq;
  8. /**
  9.  * Faq controller.
  10.  *
  11.  */
  12. class FaqController extends AbstractController
  13. {
  14.     /** @DI\Inject("doctrine.orm.entity_manager") */
  15.     private $em;
  16.     /**
  17.      * Lists all Faq entities.
  18.      * @Route("/faq.html", name="faq")
  19.      */
  20.     public function indexAction()
  21.     {
  22.         $em $this->getDoctrine()->getManager();
  23.         $request $this->container->get('request_stack')->getCurrentRequest();
  24.         $entities $em->getRepository(Faq::class)->findBy(array(), array('sortierung' => 'ASC'));
  25.         $replacements = array(
  26.             'host' => $request->getHost()
  27.         );
  28.         return $this->render("@JFJuridicusBundle/Faq/index.html.twig", array(
  29.            'entities'         => $entities
  30.            'replacements'     => $replacements
  31.         ));
  32.     }
  33. }