/** * @param ChildPromotion $promotion The ChildPromotion object to add. */ protected function doAddPromotion(ChildPromotion $promotion) { $this->collPromotions[] = $promotion; $promotion->setPromotionType($this); }
/** * Filter the query by a related \App\Propel\Promotion object * * @param \App\Propel\Promotion|ObjectCollection $promotion the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return ChildResourceQuery The current query, for fluid interface */ public function filterByPromotion($promotion, $comparison = null) { if ($promotion instanceof \App\Propel\Promotion) { return $this->addUsingAlias(ResourceTableMap::COL_RESOURCE_ID, $promotion->getResourceId(), $comparison); } elseif ($promotion instanceof ObjectCollection) { return $this->usePromotionQuery()->filterByPrimaryKeys($promotion->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByPromotion() only accepts arguments of type \\App\\Propel\\Promotion or Collection'); } }
/** * Exclude object from result * * @param ChildPromotion $promotion Object to remove from the list of results * * @return $this|ChildPromotionQuery The current query, for fluid interface */ public function prune($promotion = null) { if ($promotion) { $this->addUsingAlias(PromotionTableMap::COL_PROMOTION_ID, $promotion->getPromotionId(), Criteria::NOT_EQUAL); } return $this; }