diff options
Diffstat (limited to 'plugins/Contents/Columns/ContentTarget.php')
-rw-r--r-- | plugins/Contents/Columns/ContentTarget.php | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/plugins/Contents/Columns/ContentTarget.php b/plugins/Contents/Columns/ContentTarget.php index 9e81c687f3..7448770749 100644 --- a/plugins/Contents/Columns/ContentTarget.php +++ b/plugins/Contents/Columns/ContentTarget.php @@ -8,9 +8,9 @@ */ namespace Piwik\Plugins\Contents\Columns; -use Piwik\Piwik; +use Piwik\Columns\Discriminator; +use Piwik\Columns\Join\ActionNameJoin; use Piwik\Plugin\Dimension\ActionDimension; -use Piwik\Plugins\Actions\Segment; use Piwik\Plugins\Contents\Actions\ActionContent; use Piwik\Tracker\Action; use Piwik\Tracker\Request; @@ -19,19 +19,22 @@ class ContentTarget extends ActionDimension { protected $columnName = 'idaction_content_target'; protected $columnType = 'INTEGER(10) UNSIGNED DEFAULT NULL'; - - protected function configureSegments() + protected $type = self::TYPE_URL; + protected $nameSingular = 'Contents_ContentTarget'; + protected $namePlural = 'Contents_ContentTargets'; + protected $segmentName = 'contentTarget'; + protected $category = 'General_Actions'; + protected $sqlFilter = '\\Piwik\\Tracker\\TableLogAction::getIdActionFromSegment'; + protected $acceptValues = 'For instance the URL of a landing page: "http://landingpage.example.com"'; + + public function getDbColumnJoin() { - $segment = new Segment(); - $segment->setSegment('contentTarget'); - $segment->setName('Contents_ContentTarget'); - $segment->setAcceptedValues('For instance the URL of a landing page: "http://landingpage.example.com"'); - $this->addSegment($segment); + return new ActionNameJoin(); } - public function getName() + public function getDbDiscriminator() { - return Piwik::translate('Contents_ContentTarget'); + return new Discriminator('log_action', 'type', $this->getActionId()); } public function getActionId() |