Example #1
0
 /**
  * Declares an association between this object and a ChildPeriodicType object.
  *
  * @param  ChildPeriodicType $v
  * @return $this|\App\Propel\PeriodicPlan The current object (for fluent API support)
  * @throws PropelException
  */
 public function setPeriodicType(ChildPeriodicType $v = null)
 {
     if ($v === null) {
         $this->setPeriodicTypeId(NULL);
     } else {
         $this->setPeriodicTypeId($v->getPeriodicTypeId());
     }
     $this->aPeriodicType = $v;
     // Add binding for other direction of this n:n relationship.
     // If this object has already been added to the ChildPeriodicType object, it will not be re-added.
     if ($v !== null) {
         $v->addPeriodicPlan($this);
     }
     return $this;
 }
Example #2
0
 /**
  * Exclude object from result
  *
  * @param   ChildPeriodicType $periodicType Object to remove from the list of results
  *
  * @return $this|ChildPeriodicTypeQuery The current query, for fluid interface
  */
 public function prune($periodicType = null)
 {
     if ($periodicType) {
         $this->addUsingAlias(PeriodicTypeTableMap::COL_PERIODIC_TYPE_ID, $periodicType->getPeriodicTypeId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }
 /**
  * Filter the query by a related \App\Propel\PeriodicType object
  *
  * @param \App\Propel\PeriodicType|ObjectCollection $periodicType The related object(s) to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @throws \Propel\Runtime\Exception\PropelException
  *
  * @return ChildPeriodicTypeI18nQuery The current query, for fluid interface
  */
 public function filterByPeriodicType($periodicType, $comparison = null)
 {
     if ($periodicType instanceof \App\Propel\PeriodicType) {
         return $this->addUsingAlias(PeriodicTypeI18nTableMap::COL_PERIODIC_TYPE_ID, $periodicType->getPeriodicTypeId(), $comparison);
     } elseif ($periodicType instanceof ObjectCollection) {
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
         return $this->addUsingAlias(PeriodicTypeI18nTableMap::COL_PERIODIC_TYPE_ID, $periodicType->toKeyValue('PrimaryKey', 'PeriodicTypeId'), $comparison);
     } else {
         throw new PropelException('filterByPeriodicType() only accepts arguments of type \\App\\Propel\\PeriodicType or Collection');
     }
 }