/** * @param $productId * @param ReferencingCase $case * @param AbstractReferencingApplication $application * @param int $guarantorSequenceNumber * @return int */ public function getPrice($productId, ReferencingCase $case, AbstractReferencingApplication $application, $guarantorSequenceNumber = 0) { $criteria = array('productId' => $productId, 'propertyLetType' => $case->getPropertyLetType(), 'rentGuaranteeOfferingType' => $case->getRentGuaranteeOfferingType(), 'shareOfRent' => $application->getRentShare(), 'policyLengthInMonths' => $case->getTenancyTerm(), 'guarantorSequenceNumber' => $guarantorSequenceNumber, 'isRenewal' => 0); $productPrice = $this->irisEntityManager->find(new ProductPrice(), $criteria); return $productPrice->getGrossPrice(); }