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:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-07-28 05:01:33 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-07-28 05:01:33 +0400
commit80c4b4604020201d3fff0f232f6fff824ab1cb9b (patch)
tree33ba78364eff0d9dd09c7312446f055f27629a62 /plugins/CustomVariables/Controller.php
parentd99e37ebc3e98f8eae1a043eb9f94e0a4aa43c9a (diff)
Refs #4040, converted CustomVariables plugin to use display properties instead of manually calling ViewDataTable functions.
Diffstat (limited to 'plugins/CustomVariables/Controller.php')
-rw-r--r--plugins/CustomVariables/Controller.php31
1 files changed, 2 insertions, 29 deletions
diff --git a/plugins/CustomVariables/Controller.php b/plugins/CustomVariables/Controller.php
index 867988a79b..83b83fb779 100644
--- a/plugins/CustomVariables/Controller.php
+++ b/plugins/CustomVariables/Controller.php
@@ -23,39 +23,12 @@ class Piwik_CustomVariables_Controller extends Piwik_Controller
public function getCustomVariables($fetch = false)
{
- $view = Piwik_ViewDataTable::factory();
- $view->init($this->pluginName, __FUNCTION__, "CustomVariables.getCustomVariables", "getCustomVariablesValuesFromNameId");
-
- $this->setPeriodVariablesView($view);
- $this->setMetricsVariablesView($view);
-
- $this->configureView($view);
- $view->setColumnTranslation('label', Piwik_Translate('CustomVariables_ColumnCustomVariableName'));
-
- $view->setFooterMessage(Piwik_Translate('CustomVariables_TrackingHelp', array('<a target="_blank" href="http://piwik.org/docs/custom-variables/">', '</a>')));
-
- return $this->renderView($view, $fetch);
+ return Piwik_ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch);
}
public function getCustomVariablesValuesFromNameId($fetch = false)
{
- $view = Piwik_ViewDataTable::factory();
- $view->init($this->pluginName, __FUNCTION__, 'CustomVariables.getCustomVariablesValuesFromNameId');
-
- $this->configureView($view);
- $view->disableSearchBox();
- $view->disableExcludeLowPopulation();
- $view->setColumnTranslation('label', Piwik_Translate('CustomVariables_ColumnCustomVariableValue'));
- return $this->renderView($view, $fetch);
- }
-
- protected function configureView($view)
- {
- $view->setColumnsToDisplay(array('label', 'nb_actions', 'nb_visits'));
- $view->setSortedColumn('nb_actions');
- $view->enableShowGoals();
+ return Piwik_ViewDataTable::render($this->pluginName, __FUNCTION__, $fetch);
}
-
-
}