Пример #1
0
 /**
  * Tool Development Pipeline
  *
  * @return     void
  */
 public function pipelineTask()
 {
     // Set the page title
     $this->view->title = Lang::txt(strtoupper($this->_option)) . ': ' . Lang::txt(strtoupper($this->_option . '_' . $this->_task));
     Document::setTitle($this->view->title);
     // Filters
     $this->view->filters = array();
     $this->view->filters['filterby'] = trim(Request::getVar('filterby', 'all'));
     $this->view->filters['search'] = trim(urldecode(Request::getVar('search', '')));
     if (!$this->config->get('access-admin-component')) {
         $this->view->filters['sortby'] = trim(trim(Request::getVar('sortby', 'f.state, f.registered')));
     } else {
         $this->view->filters['sortby'] = trim(trim(Request::getVar('sortby', 'f.state_changed DESC')));
     }
     // Paging vars
     $this->view->filters['limit'] = Request::getInt('limit', Config::get('list_limit'));
     $this->view->filters['start'] = Request::getInt('limitstart', 0);
     $this->view->filters['start'] = $this->view->filters['limit'] != 0 ? floor($this->view->filters['start'] / $this->view->filters['limit']) * $this->view->filters['limit'] : 0;
     // Create a Tool object
     $obj = new \Components\Tools\Tables\Tool($this->database);
     // Record count
     $this->view->total = $obj->getToolCount($this->view->filters, $this->config->get('access-admin-component'));
     // Fetch results
     $this->view->rows = $obj->getTools($this->view->filters, $this->config->get('access-admin-component'));
     if (Pathway::count() <= 0) {
         Pathway::append(Lang::txt(strtoupper($this->_option)), 'index.php?option=' . $this->_option);
     }
     Pathway::append(Lang::txt('COM_TOOLS_PIPELINE'), 'index.php?option=' . $this->_option . '&controller=' . $this->_controller . '&task=pipeline');
     $this->view->config = $this->config;
     $this->view->admin = $this->config->get('access-admin-component');
     foreach ($this->getErrors() as $error) {
         $this->view->setError($error);
     }
     $this->view->display();
 }