Пример #1
0
 /**
  * Displays a list of records
  *
  * @return  void
  */
 public function displayTask()
 {
     // Get paging variables
     $this->view->filters = array('limit' => Request::getState($this->_option . '.messages.limit', 'limit', Config::get('list_limit'), 'int'), 'start' => Request::getState($this->_option . '.messages.limitstart', 'limitstart', 0, 'int'));
     $model = new Message($this->database);
     // Record count
     $this->view->total = $model->getCount($this->view->filters);
     // Fetch results
     $this->view->rows = $model->getRecords($this->view->filters);
     // Set any errors
     foreach ($this->getErrors() as $error) {
         $this->view->setError($error);
     }
     // Output the HTML
     $this->view->display();
 }