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