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