application/modules/g/views/helpers/Script.php
public function minifiedSrc($identifier, $render = false) {
        $config = Zend_Registry::get('config');
        if (empty($config->assets->js->{$identifier})) {
            throw new Garp_Exception(
                "JS configuration for identifier {$identifier} not found. " .
                "Please configure assets.js.{$identifier}"
            );
        }
        $jsRoot = rtrim($config->assets->js->basePath ?: '/js', '/') . '/';
        $config = $config->assets->js->{$identifier};
        if (!isset($config->disabled) || !$config->disabled) {
            // If minification is not disabled (for instance in a development environment),
            // return the path to the minified file.
            return $this->src($jsRoot . $config->filename, $render);
        } else {
            // Otherwise, return all the script tags for all the individual source files
            if (!isset($config->sourcefiles)) {
                return '';
            }
            $out = '';
            foreach ($config->sourcefiles as $sourceFile) {
                $response = $this->src($jsRoot . $sourceFile, $render);
                if ($render) {
                    $out .= $response;
                }
            }
            if ($render) {
                return $out;
            }
            return $this;
        }
    }
public function minifiedSrc($identifier, $render = false) {
        $config = Zend_Registry::get('config');
        if (empty($config->assets->js->{$identifier})) {
            throw new Garp_Exception(
                "JS configuration for identifier {$identifier} not found. " .
                "Please configure assets.js.{$identifier}"
            );
        }
        $jsRoot = rtrim($config->assets->js->basePath ?: '/js', '/') . '/';
        $config = $config->assets->js->{$identifier};
        if (!isset($config->disabled) || !$config->disabled) {
            // If minification is not disabled (for instance in a development environment),
            // return the path to the minified file.
            return $this->src($jsRoot . $config->filename, $render);
        } else {
            // Otherwise, return all the script tags for all the individual source files
            if (!isset($config->sourcefiles)) {
                return '';
            }
            $out = '';
            foreach ($config->sourcefiles as $sourceFile) {
                $response = $this->src($jsRoot . $sourceFile, $render);
                if ($render) {
                    $out .= $response;
                }
            }
            if ($render) {
                return $out;
            }
            return $this;
        }
    }
public function minifiedSrc ( $ identifier , $ render = false ) { $ config = Zend_Registry :: get ( 'config' ) ; if ( empty ( $ config -> assets -> js -> { $ identifier } ) ) { throw new Garp_Exception ( "JS configuration for identifier {$identifier} not found. " . "Please configure assets.js.{$identifier}" ) ; } $ jsRoot = rtrim ( $ config -> assets -> js -> basePath ? : '/js' , '/' ) . '/' ; $ config = $ config -> assets -> js -> { $ identifier } ; if ( ! isset ( $ config -> disabled ) || ! $ config -> disabled ) { // If minification is not disabled (for instance in a development environment), // return the path to the minified file. return $ this -> src ( $ jsRoot . $ config -> filename , $ render ) ; } else { // Otherwise, return all the script tags for all the individual source files if ( ! isset ( $ config -> sourcefiles ) ) { return '' ; } $ out = '' ; foreach ( $ config -> sourcefiles as $ sourceFile ) { $ response = $ this -> src ( $ jsRoot . $ sourceFile , $ render ) ; if ( $ render ) { $ out .= $ response ; } } if ( $ render ) { return $ out ; } return $ this ; } }
Render a script tag containing a minified script reference.

@param String $identifier Needs to be in the config under assets.js.$identifier
@param String $render Wether to render directly
@return String Script tag to the right file.
NOTE: this method does not check for the existence of said minified file.
Render a script tag containing a minified script reference .