diff options
Diffstat (limited to 'plugins/DevicesDetection/Columns/BrowserEngine.php')
-rw-r--r-- | plugins/DevicesDetection/Columns/BrowserEngine.php | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/plugins/DevicesDetection/Columns/BrowserEngine.php b/plugins/DevicesDetection/Columns/BrowserEngine.php index 1639ec59fe..c9f60cd73e 100644 --- a/plugins/DevicesDetection/Columns/BrowserEngine.php +++ b/plugins/DevicesDetection/Columns/BrowserEngine.php @@ -8,8 +8,7 @@ */ namespace Piwik\Plugins\DevicesDetection\Columns; -use Piwik\Piwik; -use Piwik\Plugins\DevicesDetection\Segment; +use Piwik\Metrics\Formatter; use Piwik\Tracker\Request; use Piwik\Tracker\Visitor; use Piwik\Tracker\Action; @@ -18,20 +17,16 @@ class BrowserEngine extends Base { protected $columnName = 'config_browser_engine'; protected $columnType = 'VARCHAR(10) NULL'; - - protected function configureSegments() - { - $segment = new Segment(); - $segment->setSegment('browserEngine'); - $segment->setName('DevicesDetection_BrowserEngine'); - $segment->setAcceptedValues('Trident, WebKit, Presto, Gecko, Blink, etc.'); - $segment->setSuggestedValuesCallback('\DeviceDetector\Parser\Client\Browser\Engine::getAvailableEngines'); - $this->addSegment($segment); - } - - public function getName() + protected $segmentName = 'browserEngine'; + protected $nameSingular = 'DevicesDetection_BrowserEngine'; + protected $namePlural = 'DevicesDetection_BrowserEngines'; + protected $acceptValues = 'Trident, WebKit, Presto, Gecko, Blink, etc.'; + protected $suggestedValuesCallback = '\DeviceDetector\Parser\Client\Browser\Engine::getAvailableEngines'; + protected $type = self::TYPE_TEXT; + + public function formatValue($value, $idSite, Formatter $formatter) { - return Piwik::translate('DevicesDetection_BrowserEngine'); + return \Piwik\Plugins\DevicesDetection\getBrowserEngineName($value); } /** |