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