-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathVisitorDetails.php
39 lines (32 loc) · 1.08 KB
/
VisitorDetails.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
<?php
/**
* AOM - Piwik Advanced Online Marketing Plugin
*
* @author Daniel Stonies <daniel.stonies@googlemail.com>
* @author André Kolell <andre.kolell@gmail.com>
*/
namespace Piwik\Plugins\AOM;
use Piwik\Plugins\AOM\Platforms\AbstractPlatform;
use Piwik\Plugins\Live\VisitorDetailsAbstract;
use Piwik\View;
class VisitorDetails extends VisitorDetailsAbstract
{
/**
* @param array $action
* @param array $previousAction
* @param array $visitorDetails
* @return string|void
*/
public function renderAction($action, $previousAction, $visitorDetails)
{
if (false === $previousAction) {
$additionalDescription = AbstractPlatform::getHumanReadableDescriptionForVisit($visitorDetails['idVisit']);
if ($additionalDescription) {
$view = new View('@AOM/_visitorProfileAomAdditionalDescription.twig');
$view->additionalDescription = $additionalDescription;
echo $view->render();
}
}
parent::renderAction($action, $previousAction, $visitorDetails);
}
}