Пример #1
0
 /**
  * Filter the query by a related \Thelia\Model\FolderDocument object
  *
  * @param \Thelia\Model\FolderDocument|ObjectCollection $folderDocument  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildFolderQuery The current query, for fluid interface
  */
 public function filterByFolderDocument($folderDocument, $comparison = null)
 {
     if ($folderDocument instanceof \Thelia\Model\FolderDocument) {
         return $this->addUsingAlias(FolderTableMap::ID, $folderDocument->getFolderId(), $comparison);
     } elseif ($folderDocument instanceof ObjectCollection) {
         return $this->useFolderDocumentQuery()->filterByPrimaryKeys($folderDocument->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByFolderDocument() only accepts arguments of type \\Thelia\\Model\\FolderDocument or Collection');
     }
 }