Пример #1
0
 /**
  * Filter the query by a related \App\Propel\UserPeriodicPlan object
  *
  * @param \App\Propel\UserPeriodicPlan|ObjectCollection $userPeriodicPlan the related object to use as filter
  * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return ChildPeriodicPlanQuery The current query, for fluid interface
  */
 public function filterByUserPeriodicPlan($userPeriodicPlan, $comparison = null)
 {
     if ($userPeriodicPlan instanceof \App\Propel\UserPeriodicPlan) {
         return $this->addUsingAlias(PeriodicPlanTableMap::COL_PERIODIC_PLAN_ID, $userPeriodicPlan->getPeriodicPlanId(), $comparison);
     } elseif ($userPeriodicPlan instanceof ObjectCollection) {
         return $this->useUserPeriodicPlanQuery()->filterByPrimaryKeys($userPeriodicPlan->getPrimaryKeys())->endUse();
     } else {
         throw new PropelException('filterByUserPeriodicPlan() only accepts arguments of type \\App\\Propel\\UserPeriodicPlan or Collection');
     }
 }
Пример #2
0
 /**
  * @param ChildUserPeriodicPlan $userPeriodicPlan The ChildUserPeriodicPlan object to add.
  */
 protected function doAddUserPeriodicPlan(ChildUserPeriodicPlan $userPeriodicPlan)
 {
     $this->collUserPeriodicPlans[] = $userPeriodicPlan;
     $userPeriodicPlan->setUser($this);
 }
Пример #3
0
 /**
  * Exclude object from result
  *
  * @param   ChildUserPeriodicPlan $userPeriodicPlan Object to remove from the list of results
  *
  * @return $this|ChildUserPeriodicPlanQuery The current query, for fluid interface
  */
 public function prune($userPeriodicPlan = null)
 {
     if ($userPeriodicPlan) {
         $this->addUsingAlias(UserPeriodicPlanTableMap::COL_USER_PERIODIC_PLAN_ID, $userPeriodicPlan->getUserPeriodicPlanId(), Criteria::NOT_EQUAL);
     }
     return $this;
 }