-
Notifications
You must be signed in to change notification settings - Fork 0
/
Widgets.php
35 lines (28 loc) · 933 Bytes
/
Widgets.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* Piwik - Open source web analytics
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
* @copyright (c) 2014-2016, Joachim Barthel
* @author Joachim Barthel <jobarthel@gmail.com>
* @category Piwik_Plugins
* @package UptimeRobotMonitor
**/
namespace Piwik\Plugins\UptimeRobotMonitor;
use Piwik\Piwik;
class Widgets extends \Piwik\Plugin\Widgets
{
protected $category = 'UptimeRobot Monitor';
protected function init()
{
$this->addWidget('UptimeRobotMonitor_widgetLiveLogList', 'widgetLiveLogList');
$settings = new Settings('UptimeRobotMonitor');
$widgetTitles = explode( "\n", $settings->widgetTitles->getValue() );
foreach ($widgetTitles as $key => $widgetTitle) {
$params = array('id' => $key);
$this->addWidget($widgetTitle, 'widgetTimeBar', $params);
}
}
}