File size: 954 Bytes
9046370 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | <?php
/**
* Matomo - free/libre analytics platform
*
* @link https://matomo.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*
*/
namespace Piwik\Plugins\CustomVariables;
use Piwik\Columns\Dimension;
use Piwik\Piwik;
class CustomDimension extends Dimension
{
protected $type = self::TYPE_TEXT;
private $id;
public function getId()
{
return $this->id;
}
public function initCustomDimension($index, Model $scope)
{
$category = $scope->getScopeDescription();
$this->id = 'CustomVariables.CustomVariable' . ucfirst($scope->getScope()) . $index;
$this->nameSingular = Piwik::translate('CustomVariables_ColumnCustomVariableValue') . ' ' . $index . ' (' . $category . ')';
$this->columnName = 'custom_var_v' . (int) $index;
$this->category = 'CustomVariables_CustomVariables';
$this->dbTableName = $scope->getUnprefixedTableName();
}
}
|