Controller/TicketController.php
public function indexAction(Request $request)
    {
        $userManager   = $this->getUserManager();
        $ticketManager = $this->get('hackzilla_ticket.ticket_manager');

        $ticketState    = $request->get('state', $this->get('translator')->trans('STATUS_OPEN', [], 'HackzillaTicketBundle'));
        $ticketPriority = $request->get('priority', null);

        $query = $ticketManager->getTicketListQuery(
            $userManager,
            $ticketManager->getTicketStatus($ticketState),
            $ticketManager->getTicketPriority($ticketPriority)
        );

        $pagination = $this->get('knp_paginator')->paginate(
            $query->getQuery(),
            $request->query->get('page', 1)/*page number*/,
            10/*limit per page*/
        );

        return $this->render(
            $this->container->getParameter('hackzilla_ticket.templates')['index'],
            [
                'pagination'     => $pagination,
                'ticketState'    => $ticketState,
                'ticketPriority' => $ticketPriority,
            ]
        );
    }
public function indexAction(Request $request)
    {
        $userManager   = $this->getUserManager();
        $ticketManager = $this->get('hackzilla_ticket.ticket_manager');

        $ticketState    = $request->get('state', $this->get('translator')->trans('STATUS_OPEN', [], 'HackzillaTicketBundle'));
        $ticketPriority = $request->get('priority', null);

        $query = $ticketManager->getTicketListQuery(
            $userManager,
            $ticketManager->getTicketStatus($ticketState),
            $ticketManager->getTicketPriority($ticketPriority)
        );

        $pagination = $this->get('knp_paginator')->paginate(
            $query->getQuery(),
            $request->query->get('page', 1)/*page number*/,
            10/*limit per page*/
        );

        return $this->render(
            $this->container->getParameter('hackzilla_ticket.templates')['index'],
            [
                'pagination'     => $pagination,
                'ticketState'    => $ticketState,
                'ticketPriority' => $ticketPriority,
            ]
        );
    }
public function indexAction ( Request $ request ) { $ userManager = $ this -> getUserManager ( ) ; $ ticketManager = $ this -> get ( 'hackzilla_ticket.ticket_manager' ) ; $ ticketState = $ request -> get ( 'state' , $ this -> get ( 'translator' ) -> trans ( 'STATUS_OPEN' , [ ] , 'HackzillaTicketBundle' ) ) ; $ ticketPriority = $ request -> get ( 'priority' , null ) ; $ query = $ ticketManager -> getTicketListQuery ( $ userManager , $ ticketManager -> getTicketStatus ( $ ticketState ) , $ ticketManager -> getTicketPriority ( $ ticketPriority ) ) ; $ pagination = $ this -> get ( 'knp_paginator' ) -> paginate ( $ query -> getQuery ( ) , $ request -> query -> get ( 'page' , 1 ) /*page number*/ , 10 /*limit per page*/ ) ; return $ this -> render ( $ this -> container -> getParameter ( 'hackzilla_ticket.templates' ) [ 'index' ] , [ 'pagination' => $ pagination , 'ticketState' => $ ticketState , 'ticketPriority' => $ ticketPriority , ] ) ; }
Lists all Ticket entities.

@param Request $request

@return \Symfony\Component\HttpFoundation\Response
Lists all Ticket entities .