public function findByOrderId($id, $locale = null)
    {
        try {
            $qb = $this->getShippingQuery($locale);
            $qb->andWhere('shipping.order = :id');
            $qb->setParameter('id', $id);

            return $qb->getQuery()->getResult();
        } catch (NoResultException $exc) {
            return null;
        }
    }
public function findByOrderId($id, $locale = null)
    {
        try {
            $qb = $this->getShippingQuery($locale);
            $qb->andWhere('shipping.order = :id');
            $qb->setParameter('id', $id);

            return $qb->getQuery()->getResult();
        } catch (NoResultException $exc) {
            return null;
        }
    }
public function findByOrderId ( $ id , $ locale = null ) { try { $ qb = $ this -> getShippingQuery ( $ locale ) ; $ qb -> andWhere ( 'shipping.order = :id' ) ; $ qb -> setParameter ( 'id' , $ id ) ; return $ qb -> getQuery ( ) -> getResult ( ) ; } catch ( NoResultException $ exc ) { return null ; } }
Finds a shipping by a order id
@param $id
@param $locale
@return array|null
Finds a shipping by a order id