range_id); if (!$range) { throw new RecordNotFoundException(); } $user = $this->getUser($request); if (!Authority::canShowForum($user, $range)) { throw new AuthorizationFailedException(); } $discussions = $topic->discussions; return $this->getPaginatedContentResponse( array_slice($discussions, ...$this->getOffsetAndLimit()), count($discussions) ); } }