public function fileAction()
{
$contents = '';
$jsFiles = array();
$aimeos = $this->get('aimeos')->get();
foreach ($aimeos->getCustomPaths('admin/extjs') as $base => $paths) {
foreach ($paths as $path) {
$jsbAbsPath = $base . '/' . $path;
$jsb2 = new \Aimeos\MW\Jsb2\Standard($jsbAbsPath, dirname($jsbAbsPath));
$jsFiles = array_merge($jsFiles, $jsb2->getFiles('js'));
}
}
foreach ($jsFiles as $file) {
if (($content = file_get_contents($file)) !== false) {
$contents .= $content;
}
}
$response = new Response($contents);
$response->headers->set('Content-Type', 'application/javascript');
return $response;
}