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:
authorMatthieu Napoli <matthieu@mnapoli.fr>2015-03-04 06:53:28 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2015-03-04 06:55:11 +0300
commita76ae7cbfe2257d697afa7dbd347ca4ba1b8a1ed (patch)
treeb17024b27127c0922bac08ea8aabf1b53827c088 /plugins
parent2d6780bd2253128bb94143c45f0a243d3510fbe0 (diff)
Simplified widget controllers
Diffstat (limited to 'plugins')
-rw-r--r--plugins/CoreHome/Controller.php10
1 files changed, 2 insertions, 8 deletions
diff --git a/plugins/CoreHome/Controller.php b/plugins/CoreHome/Controller.php
index 7fdfe1d814..f628a592f1 100644
--- a/plugins/CoreHome/Controller.php
+++ b/plugins/CoreHome/Controller.php
@@ -90,17 +90,11 @@ class Controller extends \Piwik\Plugin\Controller
return $report->render();
}
- public function renderWidget($widgetModule = null, $widgetAction = null)
+ public function renderWidget(PluginWidgets $widget, $method)
{
Piwik::checkUserHasSomeViewAccess();
- $widget = PluginWidgets::factory($widgetModule, $widgetAction);
-
- if (!empty($widget)) {
- return $widget->$widgetAction();
- }
-
- throw new Exception($this->translator->translate('General_ExceptionWidgetNotFound'));
+ return $widget->$method();
}
function redirectToCoreHomeIndex()