예제 #1
0
 /**
  * Filter the query by a related \Thelia\Model\ImportCategory object
  *
  * @param \Thelia\Model\ImportCategory|ObjectCollection $importCategory The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildImportCategoryI18nQuery The current query, for fluid interface
  */
 public function filterByImportCategory($importCategory, $comparison = null)
 {
     if ($importCategory instanceof \Thelia\Model\ImportCategory) {
         return $this->addUsingAlias(ImportCategoryI18nTableMap::ID, $importCategory->getId(), $comparison);
     } elseif ($importCategory instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(ImportCategoryI18nTableMap::ID, $importCategory->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByImportCategory() only accepts arguments of type \\Thelia\\Model\\ImportCategory or Collection');
     }
 }
예제 #2
0
파일: Import.php 프로젝트: margery/thelia
 /**
  * Declares an association between this object and a ChildImportCategory object.
  *
  * @param                  ChildImportCategory $v
  * @return                 \Thelia\Model\Import The current object (for fluent API support)
  * @throws PropelException
  */
 public function setImportCategory(ChildImportCategory $v = null)
 {
     if ($v === null) {
         $this->setImportCategoryId(NULL);
     } else {
         $this->setImportCategoryId($v->getId());
     }
     $this->aImportCategory = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildImportCategory object, it will not be re-added.
     if ($v !== null) {
         $v->addImport($this);
     }
     return $this;
 }
예제 #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildImportCategory $importCategory Object to remove from the list of results
  *
  * @return ChildImportCategoryQuery The current query, for fluid interface
  */
 public function prune($importCategory = null)
 {
     if ($importCategory) {
         $this->addUsingAlias(ImportCategoryTableMap::ID, $importCategory->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }