Journal::getMetrics PHP Method

getMetrics() public method

Retrieve a statistics report pre-filtered on this journal.
See also: for a full specification of the input and output format of this method.
public getMetrics ( $metricType = null, $columns = [], $filter = [], $orderBy = [], $range = null ) : null | array
$metricType null|integer|array metrics selection
$columns integer|array column (aggregation level) selection
$orderBy array order criteria
$range null|DBResultRange paging specification
return null | array The selected data as a simple tabular result set or null if metrics are not supported by this journal.
    function getMetrics($metricType = null, $columns = array(), $filter = array(), $orderBy = array(), $range = null)
    {
        // Add a journal filter and run the report.
        $filter[STATISTICS_DIMENSION_CONTEXT_ID] = $this->getId();
        $application = PKPApplication::getApplication();
        return $application->getMetrics($metricType, $columns, $filter, $orderBy, $range);
    }