getModuleManager()->getLoadedModules() as $name => $module) { if ($module->hasJs()) { $list[] = 'js/' . $name . '/module.js'; } } return $list; } public static function sendMinified() { header('Content-Type: application/javascript'); $basedir = Icinga::app()->getBootstrapDirecory(); $js = $out = ''; // TODO: Cache header header('Content-Type: text/css'); foreach (self::$vendorFiles as $file) { $out .= file_get_contents($basedir . '/' . $file); } foreach (self::$jsFiles as $file) { $js .= file_get_contents($basedir . '/' . $file); } $out .= Minifier::minify($js, array('flaggedComments' => false)); echo $out; } }