diff options
Diffstat (limited to 'plugins/CustomVariables/Controller.php')
-rw-r--r-- | plugins/CustomVariables/Controller.php | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/plugins/CustomVariables/Controller.php b/plugins/CustomVariables/Controller.php index 6c6054f418..9734c0883b 100644 --- a/plugins/CustomVariables/Controller.php +++ b/plugins/CustomVariables/Controller.php @@ -26,39 +26,12 @@ class Piwik_CustomVariables_Controller extends Controller public function getCustomVariables($fetch = false) { - $view = 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::renderReport($this->pluginName, __FUNCTION__, $fetch); } public function getCustomVariablesValuesFromNameId($fetch = false) { - $view = 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::renderReport($this->pluginName, __FUNCTION__, $fetch); } - - } |