public function layoutAssets (GluggiConfig $config, AssetHtmlGenerator $htmlGenerator, string $type, array $addAssets = [], array $overrideAssets = []) : Response
    {
        $overrideAssets = $overrideAssets[$type] ?? [];

        if (!empty($overrideAssets))
        {
            $assetPaths = $overrideAssets;
        }
        else
        {
            switch ($type)
            {
                case "js_head":
                    $assetPaths = $config->getJavaScriptHeadFiles();
                    break;

                case "js":
                    $assetPaths = $config->getJavaScriptFiles();
                    break;

                case "css":
                    $assetPaths = $config->getCssFiles();
                    break;

                default:
                    $assetPaths = [];
                    break;
            }

            $assetPaths = \array_merge($assetPaths, $addAssets[$type] ?? []);
        }

        return new Response(
            $htmlGenerator->linkAssets($assetPaths)
        );
    }
public function layoutAssets (GluggiConfig $config, AssetHtmlGenerator $htmlGenerator, string $type, array $addAssets = [], array $overrideAssets = []) : Response
    {
        $overrideAssets = $overrideAssets[$type] ?? [];

        if (!empty($overrideAssets))
        {
            $assetPaths = $overrideAssets;
        }
        else
        {
            switch ($type)
            {
                case "js_head":
                    $assetPaths = $config->getJavaScriptHeadFiles();
                    break;

                case "js":
                    $assetPaths = $config->getJavaScriptFiles();
                    break;

                case "css":
                    $assetPaths = $config->getCssFiles();
                    break;

                default:
                    $assetPaths = [];
                    break;
            }

            $assetPaths = \array_merge($assetPaths, $addAssets[$type] ?? []);
        }

        return new Response(
            $htmlGenerator->linkAssets($assetPaths)
        );
    }
public function layoutAssets ( GluggiConfig $ config , AssetHtmlGenerator $ htmlGenerator , string $ type , array $ addAssets = [ ] , array $ overrideAssets = [ ] ) : Response { $ overrideAssets = $ overrideAssets [ $ type ] ?? [ ] ; if ( ! empty ( $ overrideAssets ) ) { $ assetPaths = $ overrideAssets ; } else { switch ( $ type ) { case "js_head" : $ assetPaths = $ config -> getJavaScriptHeadFiles ( ) ; break ; case "js" : $ assetPaths = $ config -> getJavaScriptFiles ( ) ; break ; case "css" : $ assetPaths = $ config -> getCssFiles ( ) ; break ; default : $ assetPaths = [ ] ; break ; } $ assetPaths = \ array_merge ( $ assetPaths , $ addAssets [ $ type ] ?? [ ] ) ; } return new Response ( $ htmlGenerator -> linkAssets ( $ assetPaths ) ) ; }
Renders the layout assets

@param GluggiConfig       $config
@param AssetHtmlGenerator $htmlGenerator
@param string             $type
@param array              $addAssets
@param array              $overrideAssets

@return Response
@throws \Becklyn\AssetsBundle\Exception\AssetsException
Renders the layout assets