public function combineLoaderAction(Request $request)
    {
        $files = array_keys($request->query->all());

        $version = $this->get('assets.packages')->getVersion('/');

        try {
            $type = $this->loader->getCombinedFilesContentType($files, $version);
            $content = $this->loader->combineFilesContent($files, $version);
        } catch (NotFoundException $e) {
            throw new NotFoundHttpException($e->getMessage());
        } catch (InvalidArgumentValue $e) {
            throw new BadRequestHttpException($e->getMessage());
        }

        $headers = ['Content-Type' => $type];
        if ($this->comboCacheTtl && $version != '') {
            $headers['Cache-Control'] = "public, s-maxage=$this->comboCacheTtl";
        }

        return new Response(
            $content,
            Response::HTTP_OK,
            $headers
        );
    }
public function combineLoaderAction(Request $request)
    {
        $files = array_keys($request->query->all());

        $version = $this->get('assets.packages')->getVersion('/');

        try {
            $type = $this->loader->getCombinedFilesContentType($files, $version);
            $content = $this->loader->combineFilesContent($files, $version);
        } catch (NotFoundException $e) {
            throw new NotFoundHttpException($e->getMessage());
        } catch (InvalidArgumentValue $e) {
            throw new BadRequestHttpException($e->getMessage());
        }

        $headers = ['Content-Type' => $type];
        if ($this->comboCacheTtl && $version != '') {
            $headers['Cache-Control'] = "public, s-maxage=$this->comboCacheTtl";
        }

        return new Response(
            $content,
            Response::HTTP_OK,
            $headers
        );
    }
public function combineLoaderAction ( Request $ request ) { $ files = array_keys ( $ request -> query -> all ( ) ) ; $ version = $ this -> get ( 'assets.packages' ) -> getVersion ( '/' ) ; try { $ type = $ this -> loader -> getCombinedFilesContentType ( $ files , $ version ) ; $ content = $ this -> loader -> combineFilesContent ( $ files , $ version ) ; } catch ( NotFoundException $ e ) { throw new NotFoundHttpException ( $ e -> getMessage ( ) ) ; } catch ( InvalidArgumentValue $ e ) { throw new BadRequestHttpException ( $ e -> getMessage ( ) ) ; } $ headers = [ 'Content-Type' => $ type ] ; if ( $ this -> comboCacheTtl && $ version != '' ) { $ headers [ 'Cache-Control' ] = "public, s-maxage=$this->comboCacheTtl" ; } return new Response ( $ content , Response :: HTTP_OK , $ headers ) ; }
Load JS or CSS assets.

@param \Symfony\Component\HttpFoundation\Request $request

@return \Symfony\Component\HttpFoundation\Response
Load JS or CSS assets .