seminar_id)) { throw new RecordNotFoundException('could not find course'); } if (!ForumAuthority::has($this->getUser($request), 'view', $course, $entry)) { throw new AuthorizationFailedException(); } if (!$entries = ForumEntry::getChildEntries($entry->id)) { throw new RecordNotFoundException('could not find forum-entries'); } list($offset, $limit) = $this->getOffsetAndLimit(); $total = count($entries); $data = array_slice($entries, $offset, $limit); return $this->getPaginatedContentResponse($data, $total); } }