diff options
Diffstat (limited to 'plugins/Events/Columns/EventAction.php')
-rw-r--r-- | plugins/Events/Columns/EventAction.php | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/plugins/Events/Columns/EventAction.php b/plugins/Events/Columns/EventAction.php index 30c33fe8da..e08325e0b7 100644 --- a/plugins/Events/Columns/EventAction.php +++ b/plugins/Events/Columns/EventAction.php @@ -8,10 +8,10 @@ */ namespace Piwik\Plugins\Events\Columns; +use Piwik\Columns\Discriminator; +use Piwik\Columns\Join\ActionNameJoin; use Piwik\Exception\InvalidRequestParameterException; -use Piwik\Piwik; use Piwik\Plugin\Dimension\ActionDimension; -use Piwik\Plugins\Events\Segment; use Piwik\Plugins\Events\Actions\ActionEvent; use Piwik\Tracker\Action; use Piwik\Tracker\Request; @@ -20,18 +20,21 @@ class EventAction extends ActionDimension { protected $columnName = 'idaction_event_action'; protected $columnType = 'INTEGER(10) UNSIGNED DEFAULT NULL'; - - protected function configureSegments() + protected $type = self::TYPE_TEXT; + protected $segmentName = 'eventAction'; + protected $nameSingular = 'Events_EventAction'; + protected $namePlural = 'Events_EventActions'; + protected $category = 'Events_Events'; + protected $sqlFilter = '\Piwik\Tracker\TableLogAction::getIdActionFromSegment'; + + public function getDbColumnJoin() { - $segment = new Segment(); - $segment->setSegment('eventAction'); - $segment->setName('Events_EventAction'); - $this->addSegment($segment); + return new ActionNameJoin(); } - public function getName() + public function getDbDiscriminator() { - return Piwik::translate('Events_EventAction'); + return new Discriminator('log_action', 'type', $this->getActionId()); } public function getActionId() |