_getObject() ->select([PKPStatisticsHelper::STATISTICS_DIMENSION_CONTEXT_ID]) ->distinct(); } /** * @copydoc PKPStatsQueryBuilder::_getObject() */ protected function _getObject(): Builder { $q = DB::table('metrics_context'); if (!empty($this->contextIds)) { $q->whereIn(PKPStatisticsHelper::STATISTICS_DIMENSION_CONTEXT_ID, $this->contextIds); } $q->whereBetween(PKPStatisticsHelper::STATISTICS_DIMENSION_DATE, [$this->dateStart, $this->dateEnd]); if ($this->limit > 0) { $q->limit($this->limit); if ($this->offset > 0) { $q->offset($this->offset); } } Hook::call('StatsContext::queryObject', [&$q, $this]); return $q; } }