diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-07-23 11:52:15 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-07-23 11:52:15 +0400 |
commit | 5104d94f3b2250f766b9c520e2da8da9b4cab2e9 (patch) | |
tree | 5f30daf7bc14373fb1bbd0504ce11a771dafc02f /plugins/ExampleRssWidget | |
parent | ae4b1f4e38077b174e4df5b7d4513d63fe026a24 (diff) |
Refs #4059 Work in progress: Conversion to use Namespaces of dozen more classes
Removed many Piwik_ functions, in Piwik 2 it is best practise to use the methods calls instead
Todo: finish converting core/ classes + convert plugins/ classes to use \Piwik\Plugin namespace + fix build + Merge master
Diffstat (limited to 'plugins/ExampleRssWidget')
-rw-r--r-- | plugins/ExampleRssWidget/Controller.php | 3 | ||||
-rw-r--r-- | plugins/ExampleRssWidget/ExampleRssWidget.php | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/ExampleRssWidget/Controller.php b/plugins/ExampleRssWidget/Controller.php index 41e6691f9d..aaa53a7ef1 100644 --- a/plugins/ExampleRssWidget/Controller.php +++ b/plugins/ExampleRssWidget/Controller.php @@ -8,12 +8,13 @@ * @category Piwik_Plugins * @package Piwik_ExampleRssWidget */ +use Piwik\Controller; /** * * @package Piwik_ExampleRssWidget */ -class Piwik_ExampleRssWidget_Controller extends Piwik_Controller +class Piwik_ExampleRssWidget_Controller extends Controller { public function rssPiwik() { diff --git a/plugins/ExampleRssWidget/ExampleRssWidget.php b/plugins/ExampleRssWidget/ExampleRssWidget.php index 72831e6d0b..a0f7b33dca 100644 --- a/plugins/ExampleRssWidget/ExampleRssWidget.php +++ b/plugins/ExampleRssWidget/ExampleRssWidget.php @@ -34,7 +34,7 @@ class Piwik_ExampleRssWidget extends Plugin public function addWidgets() { - Piwik_AddWidget('Example Widgets', 'Piwik.org Blog', 'ExampleRssWidget', 'rssPiwik'); - Piwik_AddWidget('Example Widgets', 'Piwik Changelog', 'ExampleRssWidget', 'rssChangelog'); + WidgetsList::add('Example Widgets', 'Piwik.org Blog', 'ExampleRssWidget', 'rssPiwik'); + WidgetsList::add('Example Widgets', 'Piwik Changelog', 'ExampleRssWidget', 'rssChangelog'); } } |