public function findByIdAndLocale($id, $locale, $updateApiEntity = true)
    {
        $order = $this->orderRepository->findByIdAndLocale($id, $locale);

        if (!$order) {
            return null;
        }

        $order = $this->orderFactory->createApiEntity($order, $locale);

        if ($updateApiEntity) {
            $this->updateApiEntity($order, $locale);
        }

        return $order;
    }
public function findByIdAndLocale($id, $locale, $updateApiEntity = true)
    {
        $order = $this->orderRepository->findByIdAndLocale($id, $locale);

        if (!$order) {
            return null;
        }

        $order = $this->orderFactory->createApiEntity($order, $locale);

        if ($updateApiEntity) {
            $this->updateApiEntity($order, $locale);
        }

        return $order;
    }
public function findByIdAndLocale ( $ id , $ locale , $ updateApiEntity = true ) { $ order = $ this -> orderRepository -> findByIdAndLocale ( $ id , $ locale ) ; if ( ! $ order ) { return null ; } $ order = $ this -> orderFactory -> createApiEntity ( $ order , $ locale ) ; if ( $ updateApiEntity ) { $ this -> updateApiEntity ( $ order , $ locale ) ; } return $ order ; }
Finds an order by id and locale.

@param int $id
@param string $locale

@return null|Order
Finds an order by id and locale .