Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'modules/View/DataTableCloud.php')
-rw-r--r--modules/View/DataTableCloud.php85
1 files changed, 0 insertions, 85 deletions
diff --git a/modules/View/DataTableCloud.php b/modules/View/DataTableCloud.php
deleted file mode 100644
index e51e2c8706..0000000000
--- a/modules/View/DataTableCloud.php
+++ /dev/null
@@ -1,85 +0,0 @@
-<?php
-require_once "View/Cloud.php";
-class Piwik_View_DataTableCloud extends Piwik_View_DataTable
-{
-
- protected $displayLogoInsteadOfLabel = false;
- function init($currentControllerAction,
- $moduleNameAndMethod )
- {
- parent::init($currentControllerAction,
- $moduleNameAndMethod );
- $this->dataTableTemplate = 'UserSettings/templates/cloud.tpl';
-
- $this->disableOffsetInformation();
- $this->disableExcludeLowPopulation();
- $this->disableSearchBox();
- }
-
- public function main()
- {
- $this->setDefaultLimit( 30 );
- if($this->mainAlreadyExecuted)
- {
- return;
- }
- $this->mainAlreadyExecuted = true;
-
- $this->loadDataTableFromAPI();
-
- // We apply a filter to the DataTable, decoding the label column (useful for keywords for example)
- $filter = new Piwik_DataTable_Filter_ColumnCallbackReplace(
- $this->dataTable,
- 'label',
- 'urldecode'
- );
-
-
- $view = new Piwik_View($this->dataTableTemplate);
- $view->method = $this->method;
-
- $view->id = $this->getUniqIdTable();
-
-
- $view->javascriptVariablesToSet = $this->getJavascriptVariablesToSet();
-// echo $this->dataTable; exit;
- $words = $labelDetails = array();
- foreach($this->dataTable->getRows() as $row)
- {
- $label = $row->getColumn('label');
- $value = $row->getColumn('nb_unique_visitors');
- // case no unique visitors
- if($value === false)
- {
- $value = $row->getColumn('nb_visits');
- }
- $words[$label] = $value;
-
- $logo = false;
- if($this->displayLogoInsteadOfLabel)
- {
- $logo = $row->getDetail('logo');
- }
-
- $labelDetails[$label] = array(
- 'logo' => $logo,
- 'url' => $row->getDetail('url'),
- 'hits' => $value
- );
- }
- $cloud = new Piwik_Cloud($words);
- $cloudValues = $cloud->render('array');
-
- foreach($cloudValues as &$value)
- {
- $value['logoWidth'] = round(max(16, $value['percent']));
- }
-// var_dump($cloudValues);exit;
-// var_dump($labelDetails);exit;
- $view->labelDetails = $labelDetails;
- $view->cloudValues = $cloudValues;
-
- $this->view = $view;
- }
-}
-?>