protected function index() { $limit = $this->indexLimit + 1; // Grab 1 extra so we know if there are more. -- cwells $items = $this->db->selectAll($this->modelType, "{$this->indexClauses} LIMIT {$limit}"); if (is_null($items)) { throw new DatabaseException("Failed to retrieve {$this->modelType} objects.", 500); } parent::index(); if (count($items) > $this->indexLimit) { $morePages = true; unset($items[$this->indexLimit]); } $this->view->setData(array($this->modelType . 'List' => $items, 'PreviousPage' => '', 'NextPage' => empty($morePages) ? '' : "{$this->pathInURL}/page/2")); }
public function __construct() { parent::__construct(); $this->viewInfo['view']['title'] = 'Error'; $this->viewInfo['view']['description'] = 'Error'; }