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