Esempio n. 1
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aPromotionType) {
         $this->aPromotionType->removePromotionTypeI18n($this);
     }
     $this->promotion_type_id = null;
     $this->locale = null;
     $this->promotion_type_name = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
 /**
  * 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');
     }
 }
Esempio n. 3
0
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aResource) {
         $this->aResource->removePromotion($this);
     }
     if (null !== $this->aPromotionType) {
         $this->aPromotionType->removePromotion($this);
     }
     $this->promotion_id = null;
     $this->resource_id = null;
     $this->promotion_type_id = null;
     $this->promotion_value = null;
     $this->promotion_gift = null;
     $this->promotion_description = null;
     $this->promotion_starting_point = null;
     $this->promotion_starting_date = null;
     $this->promotion_ending_date = null;
     $this->promotion_is_active = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Esempio n. 4
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;
 }