Пример #1
0
 /**
  * Display a list of all entries
  *
  * @return  void
  */
 public function displayTask()
 {
     // Get filters
     $this->view->filters = array('state' => -1, 'access' => -1, 'sort' => Request::getState($this->_option . '.' . $this->_controller . '.sort', 'filter_order', 'created'), 'sort_Dir' => Request::getState($this->_option . '.' . $this->_controller . '.sortdir', 'filter_order_Dir', 'DESC'), 'search' => urldecode(Request::getState($this->_option . '.' . $this->_controller . '.search', 'search', '')), 'limit' => Request::getState($this->_option . '.' . $this->_controller . '.limit', 'limit', Config::get('list_limit'), 'int'), 'start' => Request::getState($this->_option . '.' . $this->_controller . '.limitstart', 'limitstart', 0, 'int'));
     $obj = new Tables\Item($this->database);
     // Get record count
     $this->view->total = $obj->find('count', $this->view->filters);
     // Get records
     $this->view->rows = $obj->find('list', $this->view->filters);
     // Output the HTML
     $this->view->display();
 }