$time =
$params['timestamp'
];
$output =
$params['output'
];
/** @var \Shopware\Components\Theme\PathResolver $pathResolver */
$pathResolver =
Shopware()->
Container()->
get(\Shopware\Components\Theme\PathResolver::
class);
/** @var \Shopware\Models\Shop\Shop $shop */
$shop =
Shopware()->
Container()->
get('shop'
);
/** @var \Shopware\Models\Theme\Settings $settings */
$settings =
Shopware()->
Container()->
get(\Shopware\Components\Theme\Service::
class)->
getSystemConfiguration( \Doctrine\ORM\AbstractQuery::HYDRATE_OBJECT
);
$file =
$pathResolver->
getJsFilePath($shop,
$time);
$url =
$pathResolver->
formatPathToUrl($file,
$shop);
if (!
$settings->
getForceCompile() &&
file_exists($file)) { // see: http://stackoverflow.com/a/9473886
$template->
assign($output,
[$url]);
return;
}