public function indexAction() { $identity = Zend_Auth::getInstance()->getIdentity()->toArray(); $productViewList = array('Annuity' => array(), 'Disability' => array(), 'Health' => array(), 'Life' => array()); $productGateway = new Products_Model_ProductGateway(); $productList = $productGateway->fetchActiveProducts(); foreach ($productList as $key => $value) { $productViewList[$productList[$key]['product_category_name']][$key] = $value; } //Format Serialized Data for View // array_walk_recursive($productViewList, array($this->_serialized, 'formatSerializedDataForView')); $this->_serialized->recursiveArrayWalk($productViewList); $this->view->annuityProducts = Zend_Paginator::factory($productViewList['Annuity']); $this->view->disabilityProducts = Zend_Paginator::factory($productViewList['Disability']); $this->view->healthProducts = Zend_Paginator::factory($productViewList['Health']); $this->view->lifeProducts = Zend_Paginator::factory($productViewList['Life']); $request = Zend_Controller_Front::getInstance()->getRequest(); $this->view->module = $request->getModuleName(); $this->view->controller = $request->getControllerName(); $this->view->role = $identity['role']; $this->view->annuityProducts->setCurrentPageNumber($this->_getParam('page')); $this->view->lifeProducts->setCurrentPageNumber($this->_getParam('page')); $this->view->disabilityProducts->setCurrentPageNumber($this->_getParam('page')); $this->view->healthProducts->setCurrentPageNumber($this->_getParam('page')); }