/** * @param \Sudoux\EagleBundle\Entity\EagleBorrower $borrower * @author Eric Haynes */ public function removeAllAssetRealEstateByBorrower(EagleBorrower $borrower) { if (count($this->asset_real_estate) > 0) { foreach ($this->asset_real_estate as $asset) { if ($borrower->getId() == $asset->getBorrower()->getId()) { $this->removeAssetRealEstate($asset); } } } }
/** * @param \Sudoux\EagleBundle\Entity\EagleBorrower $borrower * @author Eric Haynes */ public function removeIncomeMonthlyByBorrower(\Sudoux\EagleBundle\Entity\EagleBorrower $borrower) { if ($this->income_monthly->count() > 0) { foreach ($this->income_monthly as $income) { if ($income->getBorrower()->getId() == $borrower->getId()) { $this->removeIncomeMonthly($income); } } } }