private function getShippingQuery($locale = null)
    {
        $qb = $this->createQueryBuilder('shipping')
            ->leftJoin('shipping.deliveryAddress', 'deliveryAddress')
            ->leftJoin('shipping.status', 'status')
            ->leftJoin('shipping.shippingItems', 'shippingItems')
            ->leftJoin('shippingItems.item', 'items');

        if ($locale) {
            $qb->leftJoin('status.translations', 'statusTranslations', 'WITH', 'statusTranslations.locale = :locale')
                ->setParameter('locale', $locale);
        }
        return $qb;
    }
private function getShippingQuery($locale = null)
    {
        $qb = $this->createQueryBuilder('shipping')
            ->leftJoin('shipping.deliveryAddress', 'deliveryAddress')
            ->leftJoin('shipping.status', 'status')
            ->leftJoin('shipping.shippingItems', 'shippingItems')
            ->leftJoin('shippingItems.item', 'items');

        if ($locale) {
            $qb->leftJoin('status.translations', 'statusTranslations', 'WITH', 'statusTranslations.locale = :locale')
                ->setParameter('locale', $locale);
        }
        return $qb;
    }
private function getShippingQuery ( $ locale = null ) { $ qb = $ this -> createQueryBuilder ( 'shipping' ) -> leftJoin ( 'shipping.deliveryAddress' , 'deliveryAddress' ) -> leftJoin ( 'shipping.status' , 'status' ) -> leftJoin ( 'shipping.shippingItems' , 'shippingItems' ) -> leftJoin ( 'shippingItems.item' , 'items' ) ; if ( $ locale ) { $ qb -> leftJoin ( 'status.translations' , 'statusTranslations' , 'WITH' , 'statusTranslations.locale = :locale' ) -> setParameter ( 'locale' , $ locale ) ; } return $ qb ; }
Returns query for shippings
@param string $locale The locale to load
@return \Doctrine\ORM\QueryBuilder
Returns query for shippings