Beispiel #1
0
 /**
  * @param ChildProduct $product The ChildProduct object to add.
  */
 protected function doAddProduct(ChildProduct $product)
 {
     $this->collProducts[] = $product;
     $product->setFile($this);
 }
Beispiel #2
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->aWishlist) {
         $this->aWishlist->removeWishlistProduct($this);
     }
     if (null !== $this->aProduct) {
         $this->aProduct->removeWishlistProduct($this);
     }
     $this->wishlist_product_id = null;
     $this->wishlist_id = null;
     $this->product_id = null;
     $this->wishlist_product_comment = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
Beispiel #3
0
 /**
  * Filter the query by a related \App\Propel\Product object
  *
  * @param \App\Propel\Product|ObjectCollection $product 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 filterByProduct($product, $comparison = null)
 {
     if ($product instanceof \App\Propel\Product) {
         return $this->addUsingAlias(ResourceTableMap::COL_RESOURCE_ID, $product->getResourceId(), $comparison);
     } elseif ($product instanceof ObjectCollection) {
         return $this->useProductQuery()->filterByPrimaryKeys($product->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByProduct() only accepts arguments of type \\App\\Propel\\Product or Collection');
     }
 }
 /**
  * Filter the query by a related \App\Propel\Product object
  *
  * @param \App\Propel\Product|ObjectCollection $product 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 ChildProductHighlightedQuery The current query, for fluid interface
  */
 public function filterByProduct($product, $comparison = null)
 {
     if ($product instanceof \App\Propel\Product) {
         return $this->addUsingAlias(ProductHighlightedTableMap::COL_PRODUCT_ID, $product->getProductId(), $comparison);
     } elseif ($product instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ProductHighlightedTableMap::COL_PRODUCT_ID, $product->toKeyValue('PrimaryKey', 'ProductId'), $comparison);
     } else {
         throw new PropelException('filterByProduct() only accepts arguments of type \\App\\Propel\\Product or Collection');
     }
 }
Beispiel #5
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->aOrder) {
         $this->aOrder->removeOrderProduct($this);
     }
     if (null !== $this->aProduct) {
         $this->aProduct->removeOrderProduct($this);
     }
     if (null !== $this->aProductVariation) {
         $this->aProductVariation->removeOrderProduct($this);
     }
     $this->order_product_id = null;
     $this->order_id = null;
     $this->product_id = null;
     $this->product_variation_id = null;
     $this->product_quantity = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
 /**
  * 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->aProduct) {
         $this->aProduct->removeProductHighlighted($this);
     }
     if (null !== $this->aResource) {
         $this->aResource->removeProductHighlighted($this);
     }
     $this->product_highlighted_id = null;
     $this->product_id = null;
     $this->product_highlighted_for = null;
     $this->product_highlighted_from = null;
     $this->product_highlighted_to = null;
     $this->product_highlighted_weight = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }
 /**
  * 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->aProduct) {
         $this->aProduct->removeProductVariationType($this);
     }
     if (null !== $this->aVariationType) {
         $this->aVariationType->removeProductVariationType($this);
     }
     $this->product_variation_type_id = null;
     $this->product_id = null;
     $this->variation_type_id = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }