Ejemplo n.º 1
0
 /** Index page for list of Medieval types
  */
 public function indexAction()
 {
     $type = new MedievalTypes();
     $types = $type->getTypesByPeriod((int) $this->_period, (int) $this->_getParam('page'));
     $contexts = array('json', 'xml');
     if (in_array($this->_helper->contextSwitch()->getCurrentContext(), $contexts)) {
         $data = array('pageNumber' => $types->getCurrentPageNumber(), 'total' => number_format($types->getTotalItemCount(), 0), 'itemsReturned' => $types->getCurrentItemCount(), 'totalPages' => number_format($types->getTotalItemCount() / $types->getCurrentItemCount(), 0));
         $this->view->data = $data;
         $typesa = array();
         foreach ($types as $r => $v) {
             $typesa[$r] = $v;
         }
         $this->view->types = $typesa;
     } else {
         $this->view->types = $types;
     }
 }
Ejemplo n.º 2
0
 /** Index page for list of Medieval types
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $this->view->types = $this->_types->getTypesByPeriod((int) $this->_period, (int) $this->getParam('page'));
 }
Ejemplo n.º 3
0
 /** Set up the index page for early medieval types.
  * @access public
  * @return void
  */
 public function indexAction()
 {
     $this->view->types = $this->_types->getTypesByPeriod($this->_period, $this->getPage());
 }