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