/** * Filter the query by a related \Thelia\Model\ModuleImage object * * @param \Thelia\Model\ModuleImage|ObjectCollection $moduleImage the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildModuleQuery The current query, for fluid interface */ public function filterByModuleImage($moduleImage, $comparison = null) { if ($moduleImage instanceof \Thelia\Model\ModuleImage) { return $this->addUsingAlias(ModuleTableMap::ID, $moduleImage->getModuleId(), $comparison); } elseif ($moduleImage instanceof ObjectCollection) { return $this->useModuleImageQuery()->filterByPrimaryKeys($moduleImage->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByModuleImage() only accepts arguments of type \\Thelia\\Model\\ModuleImage or Collection'); } }