Example #1
0
 /**
  * Filter the query by a related \Thelia\Model\ProfileModule object
  *
  * @param \Thelia\Model\ProfileModule|ObjectCollection $profileModule  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 filterByProfileModule($profileModule, $comparison = null)
 {
     if ($profileModule instanceof \Thelia\Model\ProfileModule) {
         return $this->addUsingAlias(ProfileTableMap::ID, $profileModule->getProfileId(), $comparison);
     } elseif ($profileModule instanceof ObjectCollection) {
         return $this->useProfileModuleQuery()->filterByPrimaryKeys($profileModule->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByProfileModule() only accepts arguments of type \\Thelia\\Model\\ProfileModule or Collection');
     }
 }