Piwik\Plugins\Events\Archiver::aggregateEventRow PHP Method

aggregateEventRow() protected method

protected aggregateEventRow ( $row )
    protected function aggregateEventRow($row)
    {
        foreach ($this->getRecordToDimensions() as $record => $dimensions) {
            $dataArray = $this->getDataArray($record);
            $mainDimension = $dimensions[0];
            $mainLabel = $row[$mainDimension];
            // Event name is optional
            if ($mainDimension == 'eventName' && empty($mainLabel)) {
                $mainLabel = self::EVENT_NAME_NOT_SET;
            }
            $dataArray->sumMetricsEvents($mainLabel, $row);
            $subDimension = $dimensions[1];
            $subLabel = $row[$subDimension];
            if (empty($subLabel)) {
                continue;
            }
            $dataArray->sumMetricsEventsPivot($mainLabel, $subLabel, $row);
        }
    }