Esempio n. 1
0
 /**
  * Filter the query by a related \Thelia\Model\ProductSaleElements object
  *
  * @param \Thelia\Model\ProductSaleElements|ObjectCollection $productSaleElements The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildCartItemQuery The current query, for fluid interface
  */
 public function filterByProductSaleElements($productSaleElements, $comparison = null)
 {
     if ($productSaleElements instanceof \Thelia\Model\ProductSaleElements) {
         return $this->addUsingAlias(CartItemTableMap::PRODUCT_SALE_ELEMENTS_ID, $productSaleElements->getId(), $comparison);
     } elseif ($productSaleElements instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(CartItemTableMap::PRODUCT_SALE_ELEMENTS_ID, $productSaleElements->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByProductSaleElements() only accepts arguments of type \\Thelia\\Model\\ProductSaleElements or Collection');
     }
 }