Exemple #1
0
 /**
  * Declares an association between this object and a ChildBrandImage object.
  *
  * @param                  ChildBrandImage $v
  * @return                 \Thelia\Model\BrandImageI18n The current object (for fluent API support)
  * @throws PropelException
  */
 public function setBrandImage(ChildBrandImage $v = null)
 {
     if ($v === null) {
         $this->setId(NULL);
     } else {
         $this->setId($v->getId());
     }
     $this->aBrandImage = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildBrandImage object, it will not be re-added.
     if ($v !== null) {
         $v->addBrandImageI18n($this);
     }
     return $this;
 }
Exemple #2
0
 /**
  * Filter the query by a related \Thelia\Model\BrandImage object
  *
  * @param \Thelia\Model\BrandImage|ObjectCollection $brandImage  the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildBrandQuery The current query, for fluid interface
  */
 public function filterByBrandImageRelatedByBrandId($brandImage, $comparison = null)
 {
     if ($brandImage instanceof \Thelia\Model\BrandImage) {
         return $this->addUsingAlias(BrandTableMap::ID, $brandImage->getBrandId(), $comparison);
     } elseif ($brandImage instanceof ObjectCollection) {
         return $this->useBrandImageRelatedByBrandIdQuery()->filterByPrimaryKeys($brandImage->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByBrandImageRelatedByBrandId() only accepts arguments of type \\Thelia\\Model\\BrandImage or Collection');
     }
 }
Exemple #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildBrandImage $brandImage Object to remove from the list of results
  *
  * @return ChildBrandImageQuery The current query, for fluid interface
  */
 public function prune($brandImage = null)
 {
     if ($brandImage) {
         $this->addUsingAlias(BrandImageTableMap::ID, $brandImage->getId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * Filter the query by a related \Thelia\Model\BrandImage object
  *
  * @param \Thelia\Model\BrandImage|ObjectCollection $brandImage The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildBrandImageI18nQuery The current query, for fluid interface
  */
 public function filterByBrandImage($brandImage, $comparison = null)
 {
     if ($brandImage instanceof \Thelia\Model\BrandImage) {
         return $this->addUsingAlias(BrandImageI18nTableMap::ID, $brandImage->getId(), $comparison);
     } elseif ($brandImage instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(BrandImageI18nTableMap::ID, $brandImage->toKeyValue('PrimaryKey', 'Id'), $comparison);
     } else {
         throw new PropelException('filterByBrandImage() only accepts arguments of type \\Thelia\\Model\\BrandImage or Collection');
     }
 }