diff options
Diffstat (limited to 'plugins/ExampleTracker/Columns/ExampleVisitDimension.php')
-rw-r--r-- | plugins/ExampleTracker/Columns/ExampleVisitDimension.php | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/plugins/ExampleTracker/Columns/ExampleVisitDimension.php b/plugins/ExampleTracker/Columns/ExampleVisitDimension.php index 15d32592a6..0997a18ee7 100644 --- a/plugins/ExampleTracker/Columns/ExampleVisitDimension.php +++ b/plugins/ExampleTracker/Columns/ExampleVisitDimension.php @@ -41,28 +41,27 @@ class ExampleVisitDimension extends VisitDimension protected $columnType = 'INTEGER(11) DEFAULT 0 NULL'; /** + * The type of the dimension is automatically detected by the columnType. If the type of the dimension is not + * detected correctly, you may want to adjust the type manually. The configured type will affect how the dimension + * is formatted in the UI. + * @var string + */ + // protected $type = self::TYPE_NUMBER; + + /** * The name of the dimension which will be visible for instance in the UI of a related report and in the mobile app. * @return string */ - public function getName() - { - return Piwik::translate('ExampleTracker_DimensionName'); - } + protected $nameSingular = 'ExampleTracker_DimensionName'; /** - * By defining one or multiple segments a user will be able to filter their visitors by this column. For instance + * By defining a segment a user will be able to filter their visitors by this column. For instance * show all reports only considering users having more than 10 achievement points. If you do not want to define a - * segment for this dimension just remove the column. + * segment for this dimension, simply leave the name empty. */ - protected function configureSegments() - { - $segment = new Segment(); - $segment->setSegment('achievementPoints'); - $segment->setCategory('General_Visit'); - $segment->setName('ExampleTracker_DimensionName'); - $segment->setAcceptedValues('Here you should explain which values are accepted/useful: Any number, for instance 1, 2, 3 , 99'); - $this->addSegment($segment); - } + protected $segmentName = 'achievementPoints'; + + protected $acceptValues = 'Here you should explain which values are accepted/useful for segments: Any number, for instance 1, 2, 3 , 99'; /** * The onNewVisit method is triggered when a new visitor is detected. This means here you can define an initial |