/** * TODO: Document this * @param * @return * @author John Burrin * @since */ public function removePropertyAction() { $pageSession = new Zend_Session_Namespace('portfolio_insurance_quote'); $customerReferenceNumber = $pageSession->CustomerRefNo; $ajaxForm = new Form_PortfolioInsuranceQuote_removePropertyDialog(); $return = array(); $request = $this->getRequest(); $postdata = $request->getPost(); $return['success'] = false; if ($ajaxForm->isValid($postdata)) { $propertyArray = array(); $propertyManager = new Manager_Insurance_Portfolio_Property(); $propertyManager->deleteById($postdata['propertyid']); $propertyArray = $propertyManager->fetchAllProperties($customerReferenceNumber); // need to tell the view we are on step 2 $this->view->stepNum = 2; $return['html'] = $this->view->partialLoop('portfolio-insurance-quote/partials/property-list.phtml', $propertyArray); $return['success'] = true; $return['propNumb'] = count($propertyArray->toArray()); } echo Zend_Json::encode($return); }