Esempio n. 1
0
 /**
  * Display module content
  * 
  * @return  void
  */
 public function display()
 {
     $db = \App::get('db');
     // Get the module parameters
     $params = $this->params;
     $this->moduleclass = $params->get('moduleclass', '');
     $limit = intval($params->get('limit', 5));
     // Load component configs
     $config = Component::params('com_projects');
     // Load classes
     require_once Component::path('com_projects') . DS . 'tables' . DS . 'project.php';
     require_once Component::path('com_projects') . DS . 'helpers' . DS . 'html.php';
     // Set filters
     $filters = array('mine' => 1, 'limit' => $limit, 'start' => 0, 'updates' => 1, 'sortby' => 'myprojects', 'getowner' => 1);
     $setup_complete = $config->get('confirm_step', 0) ? 3 : 2;
     $this->filters = $filters;
     $this->pconfig = $config;
     // Get a record count
     $obj = new \Components\Projects\Tables\Project($db);
     $this->total = $obj->getCount($filters, false, User::get('id'), 0, $setup_complete);
     // Get records
     $this->rows = $obj->getRecords($filters, false, User::get('id'), 0, $setup_complete);
     // pass limit to view
     $this->limit = $limit;
     require $this->getLayoutPath();
 }