/** Display list of denominations */ public function denominationsAction() { $denominations = new Denominations(); $denomsList = $denominations->getDenomsValid($this->_getAllParams()); if (in_array($this->_helper->contextSwitch()->getCurrentContext(), $this->_contexts)) { $data = array('pageNumber' => $denomsList->getCurrentPageNumber(), 'total' => number_format($denomsList->getTotalItemCount(), 0), 'itemsReturned' => $denomsList->getCurrentItemCount(), 'totalPages' => number_format($denomsList->getTotalItemCount() / $denomsList->getCurrentItemCount(), 0)); $this->view->data = $data; $denoms = NULL; foreach ($denomsList as $k) { $action = $k['temporal']; switch ($action) { case $action == strtoupper('Roman'): $actionset = 'denomination'; $module = 'romancoins'; break; case $action == strtoupper('Byzantine'): $module = 'byzantinecoins'; $actionset = 'denomination'; break; case $action == strtoupper('Greek and Roman Provincial'): $module = 'greekromancoins'; $actionset = 'denomination'; break; case $action == strtoupper('Post Medieval'): $module = 'postmedievalcoins'; $actionset = 'denomination'; break; case $action == strtoupper('Early Medieval'): $module = 'earlymedievalcoins'; $actionset = 'denomination'; break; case $action == strtoupper('Iron Age'): $module = 'ironagecoins'; $actionset = 'denomination'; break; case $action == strtoupper('medieval'): $module = 'medievalcoins'; $actionset = 'denomination'; break; default: $actionset = 'denomination'; $module = 'medievalcoins'; } $denoms[] = array('id' => $k['id'], 'name' => $k['denomination'], 'period' => $k['temporal'], 'url' => 'http://finds.org.uk' . $this->view->url(array('module' => $module, 'controller' => $actionset . 's', 'action' => $actionset, 'id' => $k['id']), null, true)); } $this->view->denominations = $denoms; } else { $this->view->denominations = $denomsList; } }