public function getCustomerOrdersAction($id)
    {
        $customer = $this->getCustomer($id);

        return $this->orderManager->findBy(['customer' => $customer]);
    }
public function getCustomerOrdersAction($id)
    {
        $customer = $this->getCustomer($id);

        return $this->orderManager->findBy(['customer' => $customer]);
    }
public function getCustomerOrdersAction ( $ id ) { $ customer = $ this -> getCustomer ( $ id ) ; return $ this -> orderManager -> findBy ( [ 'customer' => $ customer ] ) ; }
Retrieves a specific customer's orders.

@ApiDoc(
requirements={
{"name"="id", "dataType"="integer", "requirement"="\d+", "description"="customer id"}
},
output={"class"="Sonata\Component\Order\OrderInterface", "groups"={"sonata_api_read"}},
statusCodes={
200="Returned when successful",
404="Returned when customer is not found"
}
)

@View(serializerGroups={"sonata_api_read"}, serializerEnableMaxDepthChecks=true)

@param $id

@return OrderInterface
Retrieves a specific customer s orders .