/**
  * Filter the query by a related \Thelia\Model\ContentDocument object
  *
  * @param \Thelia\Model\ContentDocument|ObjectCollection $contentDocument The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildContentDocumentI18nQuery The current query, for fluid interface
  */
 public function filterByContentDocument($contentDocument, $comparison = null)
 {
     if ($contentDocument instanceof \Thelia\Model\ContentDocument) {
         return $this->addUsingAlias(ContentDocumentI18nTableMap::ID, $contentDocument->getId(), $comparison);
     } elseif ($contentDocument instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ContentDocumentI18nTableMap::ID, $contentDocument->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByContentDocument() only accepts arguments of type \\Thelia\\Model\\ContentDocument or Collection');
     }
 }
Example #2
0
 /**
  * Declares an association between this object and a ChildContentDocument object.
  *
  * @param                  ChildContentDocument $v
  * @return                 \Thelia\Model\ContentDocumentI18n The current object (for fluent API support)
  * @throws PropelException
  */
 public function setContentDocument(ChildContentDocument $v = null)
 {
     if ($v === null) {
         $this->setId(NULL);
     } else {
         $this->setId($v->getId());
     }
     $this->aContentDocument = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildContentDocument object, it will not be re-added.
     if ($v !== null) {
         $v->addContentDocumentI18n($this);
     }
     return $this;
 }
Example #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildContentDocument $contentDocument Object to remove from the list of results
  *
  * @return ChildContentDocumentQuery The current query, for fluid interface
  */
 public function prune($contentDocument = null)
 {
     if ($contentDocument) {
         $this->addUsingAlias(ContentDocumentTableMap::ID, $contentDocument->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }