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