/** * Filter the query by a related LinkCategory object * * @param LinkCategory|PropelObjectCollection $linkCategory The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return LinkQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByLinkCategory($linkCategory, $comparison = null) { if ($linkCategory instanceof LinkCategory) { return $this->addUsingAlias(LinkPeer::LINK_CATEGORY_ID, $linkCategory->getId(), $comparison); } elseif ($linkCategory instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(LinkPeer::LINK_CATEGORY_ID, $linkCategory->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByLinkCategory() only accepts arguments of type LinkCategory or PropelCollection'); } }