public function removeIncomeMonthlyByBorrower(\Sudoux\MortgageBundle\Entity\Borrower $borrower) { if ($this->income_monthly->count() > 0) { foreach ($this->income_monthly as $income) { if ($income->getBorrower()->getId() == $borrower->getId()) { $this->removeIncomeMonthly($income); } } } }
public function removeAllAssetRealEstateByBorrower(Borrower $borrower) { if (count($this->asset_real_estate) > 0) { foreach ($this->asset_real_estate as $asset) { if ($borrower->getId() == $asset->getBorrower()->getId()) { $this->removeAssetRealEstate($asset); } } } }