Пример #1
0
 /**
  * Filter the query by a related \Thelia\Model\CartItem object
  *
  * @param \Thelia\Model\CartItem|ObjectCollection $cartItem  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildProductSaleElementsQuery The current query, for fluid interface
  */
 public function filterByCartItem($cartItem, $comparison = null)
 {
     if ($cartItem instanceof \Thelia\Model\CartItem) {
         return $this->addUsingAlias(ProductSaleElementsTableMap::ID, $cartItem->getProductSaleElementsId(), $comparison);
     } elseif ($cartItem instanceof ObjectCollection) {
         return $this->useCartItemQuery()->filterByPrimaryKeys($cartItem->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByCartItem() only accepts arguments of type \\Thelia\\Model\\CartItem or Collection');
     }
 }