public function renderLegacyJs()
    {
        $jsFiles = [];
        $jsCodeLines = [];

        foreach ($this->legacyHelper->get('js_files', []) as $jsItem) {
            // List of items can contain empty elements, path to files or code
            if (!empty($jsItem)) {
                if (isset($jsItem[4]) && $this->isFile($jsItem, '.js')) {
                    $jsFiles[] = $jsItem;
                } else {
                    $jsCodeLines[] = $jsItem;
                }
            }
        }

        return $this->environment->render(
            $this->jsTemplate,
            [
                'js_files' => $jsFiles,
                'js_code_lines' => $jsCodeLines,
            ]
        );
    }
public function renderLegacyJs()
    {
        $jsFiles = [];
        $jsCodeLines = [];

        foreach ($this->legacyHelper->get('js_files', []) as $jsItem) {
            // List of items can contain empty elements, path to files or code
            if (!empty($jsItem)) {
                if (isset($jsItem[4]) && $this->isFile($jsItem, '.js')) {
                    $jsFiles[] = $jsItem;
                } else {
                    $jsCodeLines[] = $jsItem;
                }
            }
        }

        return $this->environment->render(
            $this->jsTemplate,
            [
                'js_files' => $jsFiles,
                'js_code_lines' => $jsCodeLines,
            ]
        );
    }
public function renderLegacyJs ( ) { $ jsFiles = [ ] ; $ jsCodeLines = [ ] ; foreach ( $ this -> legacyHelper -> get ( 'js_files' , [ ] ) as $ jsItem ) { // List of items can contain empty elements, path to files or code if ( ! empty ( $ jsItem ) ) { if ( isset ( $ jsItem [ 4 ] ) && $ this -> isFile ( $ jsItem , '.js' ) ) { $ jsFiles [ ] = $ jsItem ; } else { $ jsCodeLines [ ] = $ jsItem ; } } } return $ this -> environment -> render ( $ this -> jsTemplate , [ 'js_files' => $ jsFiles , 'js_code_lines' => $ jsCodeLines , ] ) ; }
Generates style tags to be embedded in the page.

@return string html script and style tags
Generates style tags to be embedded in the page .