public function mostRecentOrdersAction($max = 20)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var ProductOrderRepository $productOrderRepo */
        $productOrderRepo = $em->getRepository('AmulenShopBundle:ProductOrder');
        $orders = $productOrderRepo->recentOrders($max);

        return [
            'orders' => $orders,
        ];
    }
public function mostRecentOrdersAction($max = 20)
    {
        $em = $this->getDoctrine()->getManager();

        /** @var ProductOrderRepository $productOrderRepo */
        $productOrderRepo = $em->getRepository('AmulenShopBundle:ProductOrder');
        $orders = $productOrderRepo->recentOrders($max);

        return [
            'orders' => $orders,
        ];
    }
public function mostRecentOrdersAction ( $ max = 20 ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; /** @var ProductOrderRepository $productOrderRepo */ $ productOrderRepo = $ em -> getRepository ( 'AmulenShopBundle:ProductOrder' ) ; $ orders = $ productOrderRepo -> recentOrders ( $ max ) ; return [ 'orders' => $ orders , ] ; }
Last n product orders.
@Template()
Last n product orders .