Exemple #1
0
 /**
  * Create a new QueryBuilder instance that is prepopulated for this entity name
  *
  * @param string  $alias      Table alias OPTIONAL
  * @param boolean $placedOnly Use only orders or orders + carts OPTIONAL
  *
  * @return \Doctrine\ORM\QueryBuilder
  */
 public function createQueryBuilder($alias = null, $placedOnly = true)
 {
     $result = parent::createQueryBuilder($alias);
     if ($placedOnly) {
         $result->andWhere('o.status != :tempStatus')->setParameter('tempStatus', \XLite\Model\Order::STATUS_TEMPORARY);
     }
     return $result;
 }
 /**
  * Create a new QueryBuilder instance that is prepopulated for this entity name
  *
  * @param string $alias   Table alias OPTIONAL
  * @param string $indexBy The index for the from. OPTIONAL
  *
  * @return \XLite\Model\QueryBuilder\AQueryBuilder
  */
 public function createQueryBuilder($alias = null, $indexBy = null)
 {
     if (!isset($alias)) {
         $alias = $this->getDefaultAlias();
     }
     $qb = parent::createQueryBuilder($alias, $indexBy)->linkInner($alias . '.transaction', 'pt')->linkInner('pt.order', 'o')->linkInner('o.profile', 'p')->linkInner('pt.payment_method', 'pm');
     $qb->andWhere('pt.status != :badstatus')->setParameter('badstatus', 'F');
     return $qb;
 }
Exemple #3
0
 /**
  * Create a new QueryBuilder instance that is prepopulated for this entity name
  *
  * @param string $alias   Table alias OPTIONAL
  * @param string $indexBy The index for the from.
  * @param string $code    Language code OPTIONAL
  *
  * @return \XLite\Model\QueryBuilder\AQueryBuilder
  */
 public function createQueryBuilder($alias = null, $indexBy = null, $code = null)
 {
     return $this->addLanguageQuery(parent::createQueryBuilder($alias, $indexBy), $alias, $code);
 }
Exemple #4
0
 /**
  * Create a new QueryBuilder instance that is prepopulated for this entity name
  *
  * @param string  $alias      Table alias OPTIONAL
  * @param string  $indexBy    The index for the from. OPTIONAL
  * @param boolean $placedOnly Use only orders or orders + carts OPTIONAL
  *
  * @return \XLite\Model\QueryBuilder\AQueryBuilder
  */
 public function createQueryBuilder($alias = null, $indexBy = null, $placedOnly = true)
 {
     $result = parent::createQueryBuilder($alias, $indexBy);
     if ($placedOnly) {
         $result->andWhere('o INSTANCE OF XLite\\Model\\Order');
     }
     return $result;
 }