示例#1
0
 /**
  * Declares an association between this object and a ChildPromotionType object.
  *
  * @param  ChildPromotionType $v
  * @return $this|\App\Propel\Promotion The current object (for fluent API support)
  * @throws PropelException
  */
 public function setPromotionType(ChildPromotionType $v = null)
 {
     if ($v === null) {
         $this->setPromotionTypeId(NULL);
     } else {
         $this->setPromotionTypeId($v->getPromotionTypeId());
     }
     $this->aPromotionType = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildPromotionType object, it will not be re-added.
     if ($v !== null) {
         $v->addPromotion($this);
     }
     return $this;
 }
 /**
  * Filter the query by a related \App\Propel\PromotionType object
  *
  * @param \App\Propel\PromotionType|ObjectCollection $promotionType The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildPromotionTypeI18nQuery The current query, for fluid interface
  */
 public function filterByPromotionType($promotionType, $comparison = null)
 {
     if ($promotionType instanceof \App\Propel\PromotionType) {
         return $this->addUsingAlias(PromotionTypeI18nTableMap::COL_PROMOTION_TYPE_ID, $promotionType->getPromotionTypeId(), $comparison);
     } elseif ($promotionType instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PromotionTypeI18nTableMap::COL_PROMOTION_TYPE_ID, $promotionType->toKeyValue('PrimaryKey', 'PromotionTypeId'), $comparison);
     } else {
         throw new PropelException('filterByPromotionType() only accepts arguments of type \\App\\Propel\\PromotionType or Collection');
     }
 }
示例#3
0
 /**
  * Exclude object from result
  *
  * @param   ChildPromotionType $promotionType Object to remove from the list of results
  *
  * @return $this|ChildPromotionTypeQuery The current query, for fluid interface
  */
 public function prune($promotionType = null)
 {
     if ($promotionType) {
         $this->addUsingAlias(PromotionTypeTableMap::COL_PROMOTION_TYPE_ID, $promotionType->getPromotionTypeId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }