Piwik\Plugin\Report::getMetrics PHP Метод

getMetrics() публичный Метод

By default the given {@link $metrics} are used and their corresponding translations are looked up automatically. If a metric is not translated, you should add the default metric translation for this metric using the {@hook Metrics.getDefaultMetricTranslations} event. If you want to overwrite any default metric translation you should overwrite this method, call this parent method to get all default translations and overwrite any custom metric translations.
public getMetrics ( ) : array
Результат array
    public function getMetrics()
    {
        return $this->getMetricTranslations($this->metrics);
    }

Usage Example

Пример #1
0
 public function getMetrics()
 {
     $metrics = parent::getMetrics();
     $metrics['avg_time_on_site'] = Piwik::translate('General_VisitDuration');
     $metrics['max_actions'] = Piwik::translate('General_ColumnMaxActions');
     return $metrics;
 }
All Usage Examples Of Piwik\Plugin\Report::getMetrics