diff options
Diffstat (limited to 'plugins/Actions/Columns/VisitTotalInteractions.php')
-rw-r--r-- | plugins/Actions/Columns/VisitTotalInteractions.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/Actions/Columns/VisitTotalInteractions.php b/plugins/Actions/Columns/VisitTotalInteractions.php index 9c10b1e03a..a41244211c 100644 --- a/plugins/Actions/Columns/VisitTotalInteractions.php +++ b/plugins/Actions/Columns/VisitTotalInteractions.php @@ -18,20 +18,18 @@ class VisitTotalInteractions extends VisitDimension { protected $columnName = 'visit_total_interactions'; protected $columnType = 'SMALLINT UNSIGNED DEFAULT 0'; + protected $type = self::TYPE_NUMBER; + protected $segmentName = 'interactions'; + protected $nameSingular = 'General_NbInteractions'; + protected $acceptValues = 'Any positive integer'; - protected function configureSegments() + public function __construct() { - $segment = new Segment(); - $segment->setType(Segment::TYPE_METRIC); - $segment->setSegment('interactions'); - $segment->setName('General_NbInteractions'); - $segment->setAcceptedValues('Any positive integer'); - $segment->setSuggestedValuesCallback(function ($idSite, $maxValuesToReturn) { + $this->suggestedValuesCallback = function ($idSite, $maxValuesToReturn) { $positions = range(1,50); return array_slice($positions, 0, $maxValuesToReturn); - }); - $this->addSegment($segment); + }; } /** |