src/Flowcode/ShopBundle/Controller/AdminWarehouseController.php
public function transactionsAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        $changeLogFilter = $this->createForm(StockChangeLogFilterType::class, null, array(
            'action' => $this->generateUrl('admin_warehouse_transactions'),
            'method' => 'GET',
        ));

        $changeLogFilter->handleRequest($request);

        $filter = array();
        $filter['product'] = $changeLogFilter->get('product')->getData();
        $filter['warehouse'] = $changeLogFilter->get('warehouse')->getData();

        $qb = $em->getRepository(StockChangeLog::class)->findAllFilteredQB($filter);
        $qb->addOrderBy('scl.id', "DESC");

        $paginator = $this->get('knp_paginator')->paginate($qb, $request->query->get('page', 1), 20);
        return array(
            'form_filter' => $changeLogFilter->createView(),
            'paginator' => $paginator,
        );
    }
public function transactionsAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        $changeLogFilter = $this->createForm(StockChangeLogFilterType::class, null, array(
            'action' => $this->generateUrl('admin_warehouse_transactions'),
            'method' => 'GET',
        ));

        $changeLogFilter->handleRequest($request);

        $filter = array();
        $filter['product'] = $changeLogFilter->get('product')->getData();
        $filter['warehouse'] = $changeLogFilter->get('warehouse')->getData();

        $qb = $em->getRepository(StockChangeLog::class)->findAllFilteredQB($filter);
        $qb->addOrderBy('scl.id', "DESC");

        $paginator = $this->get('knp_paginator')->paginate($qb, $request->query->get('page', 1), 20);
        return array(
            'form_filter' => $changeLogFilter->createView(),
            'paginator' => $paginator,
        );
    }
public function transactionsAction ( Request $ request ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ changeLogFilter = $ this -> createForm ( StockChangeLogFilterType :: class , null , array ( 'action' => $ this -> generateUrl ( 'admin_warehouse_transactions' ) , 'method' => 'GET' , ) ) ; $ changeLogFilter -> handleRequest ( $ request ) ; $ filter = array ( ) ; $ filter [ 'product' ] = $ changeLogFilter -> get ( 'product' ) -> getData ( ) ; $ filter [ 'warehouse' ] = $ changeLogFilter -> get ( 'warehouse' ) -> getData ( ) ; $ qb = $ em -> getRepository ( StockChangeLog :: class ) -> findAllFilteredQB ( $ filter ) ; $ qb -> addOrderBy ( 'scl.id' , "DESC" ) ; $ paginator = $ this -> get ( 'knp_paginator' ) -> paginate ( $ qb , $ request -> query -> get ( 'page' , 1 ) , 20 ) ; return array ( 'form_filter' => $ changeLogFilter -> createView ( ) , 'paginator' => $ paginator , ) ; }
Lists all Warehouse entities.

@Route("/transactions", name="admin_warehouse_transactions")
@Method("GET")
@Template()
Lists all Warehouse entities .