public function searchRecordsAction(Request $request)
    {
        $subdefTransformer = new SubdefTransformer($this->app['acl'], $this->getAuthenticatedUser(), new PermalinkTransformer());
        $technicalDataTransformer = new TechnicalDataTransformer();
        $recordTransformer = new RecordTransformer($subdefTransformer, $technicalDataTransformer);
        $searchTransformer = new V1SearchRecordsResultTransformer($recordTransformer);

        $transformerResolver = new SearchResultTransformerResolver([
            '' => $searchTransformer,
            'results' => $recordTransformer,
            'results.thumbnail' => $subdefTransformer,
            'results.technical_informations' => $technicalDataTransformer,
            'results.subdefs' => $subdefTransformer,
            'results.metadata' => new CallbackTransformer(),
            'results.status' => new CallbackTransformer(),
            'results.caption' => new CallbackTransformer(),
        ]);
        $includeResolver = new IncludeResolver($transformerResolver);

        $fractal = new \League\Fractal\Manager();
        $fractal->setSerializer(new ArraySerializer());
        $fractal->parseIncludes($this->resolveSearchRecordsIncludes($request));

        $searchView = $this->buildSearchRecordsView(
            $this->doSearch($request),
            $includeResolver->resolve($fractal),
            $this->resolveSubdefUrlTTL($request)
        );

        $ret = $fractal->createData(new Item($searchView, $searchTransformer))->toArray();

        return Result::create($request, $ret)->createResponse();
    }
public function searchRecordsAction(Request $request)
    {
        $subdefTransformer = new SubdefTransformer($this->app['acl'], $this->getAuthenticatedUser(), new PermalinkTransformer());
        $technicalDataTransformer = new TechnicalDataTransformer();
        $recordTransformer = new RecordTransformer($subdefTransformer, $technicalDataTransformer);
        $searchTransformer = new V1SearchRecordsResultTransformer($recordTransformer);

        $transformerResolver = new SearchResultTransformerResolver([
            '' => $searchTransformer,
            'results' => $recordTransformer,
            'results.thumbnail' => $subdefTransformer,
            'results.technical_informations' => $technicalDataTransformer,
            'results.subdefs' => $subdefTransformer,
            'results.metadata' => new CallbackTransformer(),
            'results.status' => new CallbackTransformer(),
            'results.caption' => new CallbackTransformer(),
        ]);
        $includeResolver = new IncludeResolver($transformerResolver);

        $fractal = new \League\Fractal\Manager();
        $fractal->setSerializer(new ArraySerializer());
        $fractal->parseIncludes($this->resolveSearchRecordsIncludes($request));

        $searchView = $this->buildSearchRecordsView(
            $this->doSearch($request),
            $includeResolver->resolve($fractal),
            $this->resolveSubdefUrlTTL($request)
        );

        $ret = $fractal->createData(new Item($searchView, $searchTransformer))->toArray();

        return Result::create($request, $ret)->createResponse();
    }
public function searchRecordsAction ( Request $ request ) { $ subdefTransformer = new SubdefTransformer ( $ this -> app [ 'acl' ] , $ this -> getAuthenticatedUser ( ) , new PermalinkTransformer ( ) ) ; $ technicalDataTransformer = new TechnicalDataTransformer ( ) ; $ recordTransformer = new RecordTransformer ( $ subdefTransformer , $ technicalDataTransformer ) ; $ searchTransformer = new V1SearchRecordsResultTransformer ( $ recordTransformer ) ; $ transformerResolver = new SearchResultTransformerResolver ( [ '' => $ searchTransformer , 'results' => $ recordTransformer , 'results.thumbnail' => $ subdefTransformer , 'results.technical_informations' => $ technicalDataTransformer , 'results.subdefs' => $ subdefTransformer , 'results.metadata' => new CallbackTransformer ( ) , 'results.status' => new CallbackTransformer ( ) , 'results.caption' => new CallbackTransformer ( ) , ] ) ; $ includeResolver = new IncludeResolver ( $ transformerResolver ) ; $ fractal = new \ League \ Fractal \ Manager ( ) ; $ fractal -> setSerializer ( new ArraySerializer ( ) ) ; $ fractal -> parseIncludes ( $ this -> resolveSearchRecordsIncludes ( $ request ) ) ; $ searchView = $ this -> buildSearchRecordsView ( $ this -> doSearch ( $ request ) , $ includeResolver -> resolve ( $ fractal ) , $ this -> resolveSubdefUrlTTL ( $ request ) ) ; $ ret = $ fractal -> createData ( new Item ( $ searchView , $ searchTransformer ) ) -> toArray ( ) ; return Result :: create ( $ request , $ ret ) -> createResponse ( ) ; }
Get a Response containing the results of a records search

@deprecated in favor of search

@param Request $request

@return Response
Get a Response containing the results of a records search