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