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);
    }
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);
    }
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 ) ; }
Returns collection of classcontent associated to category and according to provided criterias.

@return Symfony\Component\HttpFoundation\Response

@Rest\Pagination(default_count=25, max_count=100)
@Rest\Security("is_fully_authenticated() & has_role('ROLE_API_USER')")
Returns collection of classcontent associated to category and according to provided criterias .