diff options
Diffstat (limited to 'plugins/DevicesDetection/Columns/Os.php')
-rw-r--r-- | plugins/DevicesDetection/Columns/Os.php | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/DevicesDetection/Columns/Os.php b/plugins/DevicesDetection/Columns/Os.php index a787340dc2..455b971486 100644 --- a/plugins/DevicesDetection/Columns/Os.php +++ b/plugins/DevicesDetection/Columns/Os.php @@ -8,8 +8,8 @@ */ namespace Piwik\Plugins\DevicesDetection\Columns; +use Piwik\Metrics\Formatter; use Piwik\Piwik; -use Piwik\Plugins\DevicesDetection\Segment; use Piwik\Tracker\Request; use Piwik\Tracker\Settings; use Piwik\Tracker\Visitor; @@ -19,14 +19,15 @@ class Os extends Base { protected $columnName = 'config_os'; protected $columnType = 'CHAR(3) NULL'; + protected $segmentName = 'operatingSystemCode'; + protected $nameSingular = 'DevicesDetection_ColumnOperatingSystem'; + protected $namePlural = 'DevicesDetection_OperatingSystems'; + protected $acceptValues = 'WIN, MAC, LIN, AND, IPD, etc.'; + protected $type = self::TYPE_TEXT; - protected function configureSegments() + public function formatValue($value, $idSite, Formatter $formatter) { - $segment = new Segment(); - $segment->setSegment('operatingSystemCode'); - $segment->setName('DevicesDetection_ColumnOperatingSystem'); - $segment->setAcceptedValues('WIN, MAC, LIN, AND, IPD, etc.'); - $this->addSegment($segment); + return \Piwik\Plugins\DevicesDetection\getOSFamilyFullName($value); } public function getName() |