Piwik\Columns\
Manages the global list of metrics that can be used in reports.
Metrics are added automatically by dimensions as well as through the Metric.addMetrics and Metric.addComputedMetrics and filtered through the Metric.filterMetrics event. Observers for this event should call the addMetric() method to add metrics or use any of the other methods to remove metrics.
The class defines the following methods:
addMetric()
getMetrics()
— Get all available metrics.remove()
— Removes one or more metrics from the metrics list.getMetric()
addMetric()
It accepts the following parameter(s):
$metric
(Metric
) —It does not return anything or a mixed result.
getMetrics()
Get all available metrics.
Metric[]
value.remove()
Removes one or more metrics from the metrics list.
$metricCategory
(string
) —
The metric category id. Can be a translation token eg 'General_Visits' see Metric::getCategory().$metricName
(string
|false
) —
The name of the metric to remove eg 'nb_visits'. If not supplied, all metrics within that category will be removed.getMetric()
It accepts the following parameter(s):
$metricName
(string
) —Returns: Metric
|Piwik\Plugin\ArchivedMetric
|null
—