-
Notifications
You must be signed in to change notification settings - Fork 0
/
Controller.php
42 lines (36 loc) · 970 Bytes
/
Controller.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
36
37
38
39
40
41
42
<?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\LiveEngagement;
use Piwik\View;
use Piwik\Piwik;
use Piwik\Common;
use Piwik\Settings\SystemSetting;
use Piwik\Settings\UserSetting;
use Piwik\Settings\Manager as SettingsManager;
/**
*
*/
class Controller extends \Piwik\Plugin\Controller
{
private function getPluginSettings()
{
$pluginsSettings = SettingsManager::getPluginSettingsForCurrentUser();
ksort($pluginsSettings);
return $pluginsSettings;
}
public function index()
{
$settings = new Settings('LiveEngagement');
$view = new View('@LiveEngagement/index.twig');
$this->setBasicVariablesView($view);
$view->idSite = $this->idSite;
$view->refreshInterval = (int)($settings->refreshInterval->getValue()*60);
return $view->render();
}
}