コード例 #1
0
 /**
  * Exclude object from result
  *
  * @param   ChildProductDocument $productDocument Object to remove from the list of results
  *
  * @return ChildProductDocumentQuery The current query, for fluid interface
  */
 public function prune($productDocument = null)
 {
     if ($productDocument) {
         $this->addUsingAlias(ProductDocumentTableMap::ID, $productDocument->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
コード例 #2
0
 /**
  * Declares an association between this object and a ChildProductDocument object.
  *
  * @param                  ChildProductDocument $v
  * @return                 \Thelia\Model\ProductSaleElementsProductDocument The current object (for fluent API support)
  * @throws PropelException
  */
 public function setProductDocument(ChildProductDocument $v = null)
 {
     if ($v === null) {
         $this->setProductDocumentId(NULL);
     } else {
         $this->setProductDocumentId($v->getId());
     }
     $this->aProductDocument = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildProductDocument object, it will not be re-added.
     if ($v !== null) {
         $v->addProductSaleElementsProductDocument($this);
     }
     return $this;
 }
コード例 #3
0
 /**
  * Filter the query by a related \Thelia\Model\ProductDocument object
  *
  * @param \Thelia\Model\ProductDocument|ObjectCollection $productDocument The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildProductDocumentI18nQuery The current query, for fluid interface
  */
 public function filterByProductDocument($productDocument, $comparison = null)
 {
     if ($productDocument instanceof \Thelia\Model\ProductDocument) {
         return $this->addUsingAlias(ProductDocumentI18nTableMap::ID, $productDocument->getId(), $comparison);
     } elseif ($productDocument instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ProductDocumentI18nTableMap::ID, $productDocument->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByProductDocument() only accepts arguments of type \\Thelia\\Model\\ProductDocument or Collection');
     }
 }