Ejemplo n.º 1
0
 /**
  * Lists standalone resources
  *
  * @return  void
  */
 public function displayTask()
 {
     // Incoming
     $this->view->filters = array('limit' => Request::getState($this->_option . '.resources.limit', 'limit', Config::get('list_limit'), 'int'), 'start' => Request::getState($this->_option . '.resources.limitstart', 'limitstart', 0, 'int'), 'search' => urldecode(Request::getState($this->_option . '.resources.search', 'search', '')), 'sort' => Request::getState($this->_option . '.resources.sort', 'filter_order', 'created'), 'sort_Dir' => Request::getState($this->_option . '.resources.sortdir', 'filter_order_Dir', 'DESC'), 'status' => Request::getState($this->_option . '.resources.status', 'status', 'all'), 'type' => Request::getState($this->_option . '.resources.type', 'type', ''));
     $model = new Resource($this->database);
     // Get record count
     $this->view->total = $model->getItemCount($this->view->filters);
     // Get resources
     $this->view->rows = $model->getItems($this->view->filters);
     // Get <select> of types
     $rt = new Type($this->database);
     $this->view->types = $rt->getMajorTypes();
     // Set any errors
     foreach ($this->getErrors() as $error) {
         $this->view->setError($error);
     }
     // Output the HTML
     $this->view->display();
 }