/** Set up the Mack type index pages */ public function indexAction() { $types = new MackTypes(); $macks = $types->getMackTypes($this->_getAllParams()); $contexts = array('json', 'xml'); if (in_array($this->_helper->contextSwitch()->getCurrentContext(), $contexts)) { $data = array('pageNumber' => $macks->getCurrentPageNumber(), 'total' => number_format($macks->getTotalItemCount(), 0), 'itemsReturned' => $macks->getCurrentItemCount(), 'totalPages' => number_format($macks->getTotalItemCount() / $macks->getCurrentItemCount(), 0)); $this->view->data = $data; $macksa = array(); foreach ($macks as $r => $v) { $macksa['type'][$r] = $v; } $this->view->macks = $macksa; } else { $this->view->macks = $macks; } }
/** Set up the Mack type index pages * @access public * @return void */ public function indexAction() { $this->view->macks = $this->_mackTypes->getMackTypes($this->getAllParams()); }