Example #1
0
 /**
  * Filter the query by a related \Thelia\Model\ContentDocument object
  *
  * @param \Thelia\Model\ContentDocument|ObjectCollection $contentDocument  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildContentQuery The current query, for fluid interface
  */
 public function filterByContentDocument($contentDocument, $comparison = null)
 {
     if ($contentDocument instanceof \Thelia\Model\ContentDocument) {
         return $this->addUsingAlias(ContentTableMap::ID, $contentDocument->getContentId(), $comparison);
     } elseif ($contentDocument instanceof ObjectCollection) {
         return $this->useContentDocumentQuery()->filterByPrimaryKeys($contentDocument->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByContentDocument() only accepts arguments of type \\Thelia\\Model\\ContentDocument or Collection');
     }
 }