Core/Framework/Page/Template.php
final protected function getScript($area, $data_only = false)
    {
        $files = $this->page->js->getFiles($area);

        if ($data_only) {
            return $files;
        }

        // Init output var
        $html = '';

        // Create files
        foreach ($files as $file) {

            // Create script html object
            $html .= PHP_EOL . '<script src="' . $file . '"></script>';
        }

        return $html;
    }
final protected function getScript($area, $data_only = false)
    {
        $files = $this->page->js->getFiles($area);

        if ($data_only) {
            return $files;
        }

        // Init output var
        $html = '';

        // Create files
        foreach ($files as $file) {

            // Create script html object
            $html .= PHP_EOL . '<script src="' . $file . '"></script>';
        }

        return $html;
    }
final protected function getScript ( $ area , $ data_only = false ) { $ files = $ this -> page -> js -> getFiles ( $ area ) ; if ( $ data_only ) { return $ files ; } // Init output var $ html = '' ; // Create files foreach ( $ files as $ file ) { // Create script html object $ html .= PHP_EOL . '<script src="' . $ file . '"></script>' ; } return $ html ; }
Creates and returns js script stuff for the requested area.

@param string $area
Valid areas are 'top' and 'below'.
@param boolean $data_only
Set to true if you want to get get only the data without a generated html

@return string|array
Creates and returns js script stuff for the requested area .