diff --git a/ProfileSummary/BandwidthSummary.php b/ProfileSummary/BandwidthSummary.php new file mode 100644 index 0000000..1ab2f3f --- /dev/null +++ b/ProfileSummary/BandwidthSummary.php @@ -0,0 +1,52 @@ +profile['avgBandwidth'])) { + return ''; + } + + $view = new View('@Bandwidth/_profileSummary.twig'); + $view->visitorData = $this->profile; + return $view->render(); + } + + /** + * @inheritdoc + */ + public function getOrder() + { + return 70; + } +} \ No newline at end of file diff --git a/VisitorDetails.php b/VisitorDetails.php index 2891d05..fe2c43a 100644 --- a/VisitorDetails.php +++ b/VisitorDetails.php @@ -70,15 +70,4 @@ public function finalizeProfile($visits, &$profile) $profile['avgBandwidth'] = $formatter->getPrettySizeFromBytes(round($this->sumBandwidth / $this->actionsWithBandwidth)); } } - - public function renderProfileSummary($profile) - { - if (!isset($profile['avgBandwidth'])) { - return array(); - } - - $view = new View('@Bandwidth/_profileSummary.twig'); - $view->visitorData = $profile; - return array(array(70, $view->render())); - } } \ No newline at end of file