/** * List types * * @return void */ public function displayTask() { // Incoming $this->view->filters = array('limit' => Request::getState($this->_option . '.types.limit', 'limit', Config::get('list_limit'), 'int'), 'start' => Request::getState($this->_option . '.types.limitstart', 'limitstart', 0, 'int'), 'search' => Request::getState($this->_option . '.types.search', 'search', ''), 'sort' => Request::getState($this->_option . '.types.sort', 'filter_order', 'id'), 'sort_Dir' => Request::getState($this->_option . '.types.sortdir', 'filter_order_Dir', 'ASC')); $this->view->filters['state'] = 'all'; // Instantiate an object $database = App::get('db'); $rt = new \Components\Publications\Tables\MasterType($database); // Get a record count $this->view->total = $rt->getCount($this->view->filters); // Get records $this->view->rows = $rt->getRecords($this->view->filters); // Set any errors if ($this->getError()) { $this->view->setError($this->getError()); } $this->view->config = $this->config; // Output the HTML $this->view->display(); }