/** * Resets all references to other model objects or collections of model objects. * * This method is a user-space workaround for PHP's inability to garbage collect * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->aLeasingUnit instanceof Persistent) { $this->aLeasingUnit->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) $this->aLeasingUnit = null; }
/** * @param LeasingUnit $leasingUnit The leasingUnit object to add. */ protected function doAddLeasingUnit($leasingUnit) { $this->collLeasingUnits[] = $leasingUnit; $leasingUnit->setLeasingUnitDressUp($this); }
/** * @param LeasingUnit $leasingUnit The leasingUnit object to add. */ protected function doAddLeasingUnit($leasingUnit) { $this->collLeasingUnits[] = $leasingUnit; $leasingUnit->setLeasingLeaseType($this); }
public function savePropertyAction() { $request = $this->getRequest(); $uType = LeasingUnitTypePeer::getTypeByName($request->request->get('type')); $uLoc = LeasingLocationPeer::getLocationByName($request->request->get('loc')); //Lease Type $lt = json_decode($request->request->get('lease')); if (count($lt > 1)) { $leaseType = 'both'; } else { $leaseType = $lt[0]; } $uLease = LeasingLeaseTypePeer::getLeaseTypeByName($leaseType); $unit = LeasingUnitPeer::getUnitByPostId($request->request->get('post_id')); if (empty($unit)) { $unit = new LeasingUnit(); } $unit->setName($request->request->get('name')); $unit->setPostId($request->request->get('post_id')); $unit->setContent($request->request->get('content')); $unit->setAvailability($request->request->get('avail')); $unit->setPriceRange($request->request->get('price')); $unit->setStatus(C::ACTIVE); $unit->setUnitTypeId($uType->getId()); $unit->setLocationId($uLoc->getId()); $unit->setLeaseTypeId($uLease->getId()); $unit->save(); return new RedirectResponse('http://leasing.dmcihomes.com.local/wp-admin/post.php'); }
/** * Filter the query by a related LeasingUnit object * * @param LeasingUnit|PropelObjectCollection $leasingUnit the related object to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return LeasingUnitNumberBedroomsQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByLeasingUnit($leasingUnit, $comparison = null) { if ($leasingUnit instanceof LeasingUnit) { return $this->addUsingAlias(LeasingUnitNumberBedroomsPeer::ID, $leasingUnit->getBrId(), $comparison); } elseif ($leasingUnit instanceof PropelObjectCollection) { return $this->useLeasingUnitQuery()->filterByPrimaryKeys($leasingUnit->getPrimaryKeys())->endUse(); } else { throw new PropelException('filterByLeasingUnit() only accepts arguments of type LeasingUnit or PropelCollection'); } }
/** * @param LeasingUnit $leasingUnit The leasingUnit object to add. */ protected function doAddLeasingUnit($leasingUnit) { $this->collLeasingUnits[] = $leasingUnit; $leasingUnit->setLeasingUnitNumberBedrooms($this); }
/** * Filter the query by a related LeasingUnit object * * @param LeasingUnit|PropelObjectCollection $leasingUnit The related object(s) to use as filter * @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL * * @return LeasingUnitFeaturesQuery The current query, for fluid interface * @throws PropelException - if the provided filter is invalid. */ public function filterByLeasingUnit($leasingUnit, $comparison = null) { if ($leasingUnit instanceof LeasingUnit) { return $this->addUsingAlias(LeasingUnitFeaturesPeer::UNIT_ID, $leasingUnit->getId(), $comparison); } elseif ($leasingUnit instanceof PropelObjectCollection) { if (null === $comparison) { $comparison = Criteria::IN; } return $this->addUsingAlias(LeasingUnitFeaturesPeer::UNIT_ID, $leasingUnit->toKeyValue('PrimaryKey', 'Id'), $comparison); } else { throw new PropelException('filterByLeasingUnit() only accepts arguments of type LeasingUnit or PropelCollection'); } }
/** * Resets all references to other model objects or collections of model objects. * * This method is a user-space workaround for PHP's inability to garbage collect * objects with circular references (even in PHP 5.3). This is currently necessary * when using Propel in certain daemon or large-volume/high-memory operations. * * @param boolean $deep Whether to also clear the references on all referrer objects. */ public function clearAllReferences($deep = false) { if ($deep && !$this->alreadyInClearAllReferencesDeep) { $this->alreadyInClearAllReferencesDeep = true; if ($this->collLeasingBookingAssignments) { foreach ($this->collLeasingBookingAssignments as $o) { $o->clearAllReferences($deep); } } if ($this->collLeasingPaymentTransactionss) { foreach ($this->collLeasingPaymentTransactionss as $o) { $o->clearAllReferences($deep); } } if ($this->aLeasingBookingLeads instanceof Persistent) { $this->aLeasingBookingLeads->clearAllReferences($deep); } if ($this->aLeasingUnit instanceof Persistent) { $this->aLeasingUnit->clearAllReferences($deep); } $this->alreadyInClearAllReferencesDeep = false; } // if ($deep) if ($this->collLeasingBookingAssignments instanceof PropelCollection) { $this->collLeasingBookingAssignments->clearIterator(); } $this->collLeasingBookingAssignments = null; if ($this->collLeasingPaymentTransactionss instanceof PropelCollection) { $this->collLeasingPaymentTransactionss->clearIterator(); } $this->collLeasingPaymentTransactionss = null; $this->aLeasingBookingLeads = null; $this->aLeasingUnit = null; }
/** * Adds an object to the instance pool. * * Propel keeps cached copies of objects in an instance pool when they are retrieved * from the database. In some cases -- especially when you override doSelect*() * methods in your stub classes -- you may need to explicitly add objects * to the cache in order to ensure that the same objects are always returned by doSelect*() * and retrieveByPK*() calls. * * @param LeasingUnit $obj A LeasingUnit object. * @param string $key (optional) key to use for instance map (for performance boost if key was already calculated externally). */ public static function addInstanceToPool($obj, $key = null) { if (Propel::isInstancePoolingEnabled()) { if ($key === null) { $key = (string) $obj->getId(); } // if key === null LeasingUnitPeer::$instances[$key] = $obj; } }
/** * Exclude object from result * * @param LeasingUnit $leasingUnit Object to remove from the list of results * * @return LeasingUnitQuery The current query, for fluid interface */ public function prune($leasingUnit = null) { if ($leasingUnit) { $this->addUsingAlias(LeasingUnitPeer::ID, $leasingUnit->getId(), Criteria::NOT_EQUAL); } return $this; }
/** * @param LeasingUnit $leasingUnit The leasingUnit object to add. */ protected function doAddLeasingUnit($leasingUnit) { $this->collLeasingUnits[] = $leasingUnit; $leasingUnit->setLeasingProjects($this); }