/** * Filter the query by a related SectionHasItem object * * @param SectionHasItem $sectionHasItem the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ItemQuery The current query, for fluid interface */ public function filterBySectionHasItem($sectionHasItem, $comparison = null) { if ($sectionHasItem instanceof SectionHasItem) { return $this->addUsingAlias(ItemPeer::ID, $sectionHasItem->getItemId(), $comparison); } elseif ($sectionHasItem instanceof PropelCollection) { return $this->useSectionHasItemQuery()->filterByPrimaryKeys($sectionHasItem->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterBySectionHasItem() only accepts arguments of type SectionHasItem or PropelCollection'); } }
/** * @param Section $section The section object to add. */ protected function doAddSection($section) { $sectionHasItem = new SectionHasItem(); $sectionHasItem->setSection($section); $this->addSectionHasItem($sectionHasItem); }
/** * Exclude object from result * * @param SectionHasItem $sectionHasItem Object to remove from the list of results * * @return SectionHasItemQuery The current query, for fluid interface */ public function prune($sectionHasItem = null) { if ($sectionHasItem) { $this->addUsingAlias(SectionHasItemPeer::ID, $sectionHasItem->getId(), Criteria::NOT_EQUAL); } return $this; }