Controller/AzineEmailController.php
public function emailsDashboardAction(Request $request)
    {
        $form = $this->createForm(SentEmailType::class);
        $form->handleRequest($request);
        $searchParams = $form->getData();
        /** @var SentEmailRepository $repository */
        $repository = $this->getDoctrine()->getManager()->getRepository(SentEmail::class);
        $query = $repository->search($searchParams);
        $pagination = $this->get('knp_paginator')->paginate($query, $request->query->getInt('page', 1));

        return $this->render('AzineEmailBundle::emailsDashboard.html.twig',
            array('form' => $form->createView(), 'pagination' => $pagination));
    }
public function emailsDashboardAction(Request $request)
    {
        $form = $this->createForm(SentEmailType::class);
        $form->handleRequest($request);
        $searchParams = $form->getData();
        /** @var SentEmailRepository $repository */
        $repository = $this->getDoctrine()->getManager()->getRepository(SentEmail::class);
        $query = $repository->search($searchParams);
        $pagination = $this->get('knp_paginator')->paginate($query, $request->query->getInt('page', 1));

        return $this->render('AzineEmailBundle::emailsDashboard.html.twig',
            array('form' => $form->createView(), 'pagination' => $pagination));
    }
public function emailsDashboardAction ( Request $ request ) { $ form = $ this -> createForm ( SentEmailType :: class ) ; $ form -> handleRequest ( $ request ) ; $ searchParams = $ form -> getData ( ) ; /** @var SentEmailRepository $repository */ $ repository = $ this -> getDoctrine ( ) -> getManager ( ) -> getRepository ( SentEmail :: class ) ; $ query = $ repository -> search ( $ searchParams ) ; $ pagination = $ this -> get ( 'knp_paginator' ) -> paginate ( $ query , $ request -> query -> getInt ( 'page' , 1 ) ) ; return $ this -> render ( 'AzineEmailBundle::emailsDashboard.html.twig' , array ( 'form' => $ form -> createView ( ) , 'pagination' => $ pagination ) ) ; }
Displays an Emails-Dashboard with filters for each property of SentEmails entity and links to
emailDetailsByToken & webView actions for each email.

@param Request $request

@return Response
Displays an Emails - Dashboard with filters for each property of SentEmails entity and links to emailDetailsByToken & webView actions for each email .