Repository/SellerWindowRepository.php
public function findUpcomingForSeller(Profile $seller)
    {
        $em = $this->getEntityManager();

        $q  = $em->createQuery('
                SELECT w
                FROM HarvestCloudCoreBundle:SellerWindow w
                LEFT JOIN w.sellerHubRef shr
                LEFT JOIN shr.hub h
                WHERE shr.seller = :seller
                AND w.end_time >= :now
            ')
            ->setParameter('seller', $seller)
            ->setParameter('now', date('Y-m-d H:i:s'))
        ;

        return $q->getResult();
    }
public function findUpcomingForSeller(Profile $seller)
    {
        $em = $this->getEntityManager();

        $q  = $em->createQuery('
                SELECT w
                FROM HarvestCloudCoreBundle:SellerWindow w
                LEFT JOIN w.sellerHubRef shr
                LEFT JOIN shr.hub h
                WHERE shr.seller = :seller
                AND w.end_time >= :now
            ')
            ->setParameter('seller', $seller)
            ->setParameter('now', date('Y-m-d H:i:s'))
        ;

        return $q->getResult();
    }
public function findUpcomingForSeller ( Profile $ seller ) { $ em = $ this -> getEntityManager ( ) ; $ q = $ em -> createQuery ( '
                SELECT w
                FROM HarvestCloudCoreBundle:SellerWindow w
                LEFT JOIN w.sellerHubRef shr
                LEFT JOIN shr.hub h
                WHERE shr.seller = :seller
                AND w.end_time >= :now
            ' ) -> setParameter ( 'seller' , $ seller ) -> setParameter ( 'now' , date ( 'Y-m-d H:i:s' ) ) ; return $ q -> getResult ( ) ; }
Find upcoming for a given Seller

@author Tom Haskins-Vaughan <tom@harvestcloud.com>
@since  2012-10-10

@param  Profile $seller
Find upcoming for a given Seller