Method | Description | |
---|---|---|
__construct ( |
||
getMetadata ( $idSite, $apiModule, $apiAction, $apiParameters = [], $language = false, $period = false, $date = false, $hideMetricsDoc = false, $showSubtableReports = false ) | Loads reports metadata, then return the requested one, matching optional API parameters. | |
getPrettyValue ( Piwik\Metrics\Formatter $formatter, integer $idSite, string $columnName, mixed $value ) : string | Prettifies a metric value based on the column name. | |
getProcessedReport ( $idSite, $period, $date, $apiModule, $apiAction, $segment = false, $apiParameters = false, $idGoal = false, $language = false, $showTimer = true, $hideMetricsDoc = false, $idSubtable = false, $showRawMetrics = false, $formatMetrics = null, $idDimension = false ) | ||
getReportMetadata ( integer $idSite, boolean | string $period = false, boolean | |
Triggers a hook to ask plugins for available Reports. | |
getReportMetadataByUniqueId ( $idSite, $apiMethodUniqueId ) | ||
isValidMetricForReport ( string $metric, integer $idSite, string $apiMethodUniqueId ) : boolean | Verfies whether the given metric belongs to the given report. | |
isValidReportForSite ( integer $idSite, string $apiMethodUniqueId ) : boolean | Verfies whether the given report exists for the given site. | |
sortReports ( array $a, array $b ) : integer | API metadata are sorted by category/name, with a little tweak to replicate the standard Piwik category ordering | |
translateMetric ( string $metric, integer $idSite, string $apiMethodUniqueId ) : null | string | Translates the given metric in case the report exists and in case the metric acutally belongs to the report. |
Method | Description | |
---|---|---|
aggregateReportTotalValues ( $simpleDataTable, $totals ) | ||
buildReportMetadataCacheKey ( $idSite, $period, $date, $hideMetricsDoc, $showSubtableReports ) | ||
getColumnsToKeep ( ) | ||
getColumnsToRemove ( ) | ||
getImplodedArray ( $v ) : string | ||
handleSimpleDataTable ( integer $idSite, Piwik\DataTable\Simple $simpleDataTable, array $metadataColumns, boolean $hasDimension, boolean $returnRawMetrics = false, boolean | null $formatMetrics = null ) : array | Enhance $simpleDataTable using metadata : | |
handleTableReport ( integer $idSite, Piwik\DataTable\Map | Piwik\DataTable\Simple $dataTable, array &$reportMetadata, boolean $showRawMetrics = false, boolean | null $formatMetrics = null ) : array | Enhance a $dataTable using metadata : | |
hideShowMetrics ( array $columns, array $emptyColumns = [] ) : array | Removes column names from an array based on the values in the hideColumns, showColumns query parameters. This is a hack that provides the ColumnDelete filter functionality in processed reports. | |
hideShowMetricsWithParams ( $columns, $columnsToRemove, $columnsToKeep, $emptyColumns = [] ) | ||
removeEmptyColumns ( &$columns, &$reportMetadata, $dataTable ) | Removes metrics from the list of columns and the report meta data if they are marked empty in the data table meta data. |
public __construct ( |
||
$reportsProvider |
public getMetadata ( $idSite, $apiModule, $apiAction, $apiParameters = [], $language = false, $period = false, $date = false, $hideMetricsDoc = false, $showSubtableReports = false ) |
public static getPrettyValue ( Piwik\Metrics\Formatter $formatter, integer $idSite, string $columnName, mixed $value ) : string | ||
$formatter | Piwik\Metrics\Formatter | |
$idSite | integer | The ID of the site the metric is for (used if the column value is an amount of money). |
$columnName | string | The metric name. |
$value | mixed | The metric value. |
return | string |
public getProcessedReport ( $idSite, $period, $date, $apiModule, $apiAction, $segment = false, $apiParameters = false, $idGoal = false, $language = false, $showTimer = true, $hideMetricsDoc = false, $idSubtable = false, $showRawMetrics = false, $formatMetrics = null, $idDimension = false ) |
public getReportMetadata ( integer $idSite, boolean | string $period = false, boolean | |
||
$idSite | integer | |
$period | boolean | string | |
$date | boolean | |
|
$hideMetricsDoc | boolean | |
$showSubtableReports | boolean | |
return | array |
public getReportMetadataByUniqueId ( $idSite, $apiMethodUniqueId ) |