1
0
Fork 0
mirror of https://github.com/Findus23/matomo-DiagnosticsExtended.git synced 2024-09-19 16:03:46 +02:00
matomo-DiagnosticsExtended/DiagnosticsExtended.php

46 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2021-03-22 22:55:14 +01:00
<?php
/**
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\DiagnosticsExtended;
use Piwik\Notification;
use Piwik\Piwik;
2021-03-22 22:55:14 +01:00
class DiagnosticsExtended extends \Piwik\Plugin
{
public function registerEvents()
{
return [
'Request.dispatch' => "addNotification"
];
}
public function addNotification(&$module, &$action, &$parameters)
{
if ($module == "Installation" && $action == "systemCheckPage") {
$id = 'DiagnosticsExtended_Help';
$notification = new Notification(Piwik::translate("DiagnosticsExtended_NotificationText",
[
'<a href="https://forum.matomo.org/" target="_blank" rel="noopener">',
'</a>',
'<a href="https://github.com/Findus23/matomo-DiagnosticsExtended/issues" target="_blank" rel="noopener">',
'</a>'
]
));
$notification->raw = true;
$notification->title = Piwik::translate('DiagnosticsExtended_NotificationTitle');
$notification->context = Notification::CONTEXT_INFO;
\Piwik\Notification\Manager::notify($id, $notification);
}
}
2021-03-22 22:55:14 +01:00
}