Example #1
0
 /**
  * Filter the query by a related \Thelia\Model\Customer object
  *
  * @param \Thelia\Model\Customer|ObjectCollection $customer  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildLangQuery The current query, for fluid interface
  */
 public function filterByCustomer($customer, $comparison = null)
 {
     if ($customer instanceof \Thelia\Model\Customer) {
         return $this->addUsingAlias(LangTableMap::ID, $customer->getLangId(), $comparison);
     } elseif ($customer instanceof ObjectCollection) {
         return $this->useCustomerQuery()->filterByPrimaryKeys($customer->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByCustomer() only accepts arguments of type \\Thelia\\Model\\Customer or Collection');
     }
 }