Example #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->aVariation) {
         $this->aVariation->removeVariationI18n($this);
     }
     $this->variation_id = null;
     $this->locale = null;
     $this->variation_name = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Example #2
0
 /**
  * Filter the query by a related \App\Propel\Variation object
  *
  * @param \App\Propel\Variation|ObjectCollection $variation 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 ChildVariationI18nQuery The current query, for fluid interface
  */
 public function filterByVariation($variation, $comparison = null)
 {
     if ($variation instanceof \App\Propel\Variation) {
         return $this->addUsingAlias(VariationI18nTableMap::COL_VARIATION_ID, $variation->getVariationId(), $comparison);
     } elseif ($variation instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(VariationI18nTableMap::COL_VARIATION_ID, $variation->toKeyValue('PrimaryKey', 'VariationId'), $comparison);
     } else {
         throw new PropelException('filterByVariation() only accepts arguments of type \\App\\Propel\\Variation or Collection');
     }
 }
Example #3
0
 /**
  * Filter the query by a related \App\Propel\Variation object
  *
  * @param \App\Propel\Variation|ObjectCollection $variation the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildVariationTypeQuery The current query, for fluid interface
  */
 public function filterByVariation($variation, $comparison = null)
 {
     if ($variation instanceof \App\Propel\Variation) {
         return $this->addUsingAlias(VariationTypeTableMap::COL_VARIATION_TYPE_ID, $variation->getVariationTypeId(), $comparison);
     } elseif ($variation instanceof ObjectCollection) {
         return $this->useVariationQuery()->filterByPrimaryKeys($variation->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByVariation() only accepts arguments of type \\App\\Propel\\Variation or Collection');
     }
 }
Example #4
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->aProductVariationType) {
         $this->aProductVariationType->removeProductVariation($this);
     }
     if (null !== $this->aVariation) {
         $this->aVariation->removeProductVariation($this);
     }
     $this->product_variation_id = null;
     $this->product_variation_type_id = null;
     $this->variation_id = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Example #5
0
 /**
  * Exclude object from result
  *
  * @param   ChildVariation $variation Object to remove from the list of results
  *
  * @return $this|ChildVariationQuery The current query, for fluid interface
  */
 public function prune($variation = null)
 {
     if ($variation) {
         $this->addUsingAlias(VariationTableMap::COL_VARIATION_ID, $variation->getVariationId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
Example #6
0
 /**
  * @param ChildVariation $variation The ChildVariation object to add.
  */
 protected function doAddVariation(ChildVariation $variation)
 {
     $this->collVariations[] = $variation;
     $variation->setVariationType($this);
 }