Exemple #1
0
 /**
  * Parses the most important pages
  *
  * @return	void
  */
 private function parseImportantPages()
 {
     // get results
     $results = BackendAnalyticsModel::getTopPages($this->startTimestamp, $this->endTimestamp);
     // there are some results
     if (!empty($results)) {
         // get the datagrid
         $dataGrid = new BackendDataGridArray($results);
         // hide columns
         $dataGrid->setColumnHidden('page_encoded');
         // set headers values
         $headers['pageviews_percentage'] = '% ' . ucfirst(BL::lbl('Pageviews'));
         // set headers
         $dataGrid->setHeaderLabels($headers);
         // set url
         $dataGrid->setColumnURL('page', BackendModel::createURLForAction('detail_page') . '&page=[page_encoded]');
         // parse the datagrid
         $this->tpl->assign('dgContent', $dataGrid->getContent());
     }
 }
Exemple #2
0
 /**
  * Parses the most important pages
  */
 private function parseImportantPages()
 {
     $results = BackendAnalyticsModel::getTopPages($this->startTimestamp, $this->endTimestamp);
     if (!empty($results)) {
         $dataGrid = new BackendDataGridArray($results);
         $dataGrid->setColumnHidden('page_encoded');
         // check if this action is allowed
         if (BackendAuthentication::isAllowedAction('detail_page', $this->getModule())) {
             $dataGrid->setColumnURL('page', BackendModel::createURLForAction('detail_page') . '&page=[page_encoded]');
         }
         // set headers
         $dataGrid->setHeaderLabels(array('pageviews_percentage' => '% ' . SpoonFilter::ucfirst(BL::lbl('Pageviews'))));
         // parse the datagrid
         $this->tpl->assign('dgContent', $dataGrid->getContent());
     }
 }