public function getCollectionAction($start, $count, Request $request)
    {
        $contents = [];
        $format = $this->getFormatParam();
        $response = $this->createJsonResponse();
        $categoryName = $request->query->get('category', null);
        $usePagination = $request->query->get('usePagination', true);
        if (AbstractClassContent::JSON_DEFINITION_FORMAT === $format) {
            $response->setData($contents = $this->getClassContentDefinitionsByCategory($categoryName));
            $start = 0;
        } else {
            if (null !== $categoryName) {
                $contents = $this->getClassContentByCategory($categoryName, $start, $count);
            } else {
                $classnames = $this->getClassContentManager()->getAllClassContentClassnames();
                $contents = $this->findContentsByCriteria($classnames, $start, $count);
            }

            $data = $this->getClassContentManager()->jsonEncodeCollection($contents, $this->getFormatParam());
            $response->setData($data);
        }

        return $this->addContentRangeHeadersToResponse($response, $contents, $start, (boolean) $usePagination);
    }