AsseticBundle\View\Helper\Asset::setupAsset PHP Method

setupAsset() protected method

protected setupAsset ( Assetic\Asset\AssetInterface $asset, array $options = [] ) : string
$asset Assetic\Asset\AssetInterface
$options array
return string
    protected function setupAsset(AssetInterface $asset, array $options = [])
    {
        $ret = '';
        if ($this->service->getConfiguration()->isDebug() && !$this->service->getConfiguration()->isCombine() && $asset instanceof AssetCollection) {
            // Move assets as single instance not as a collection
            foreach ($asset as $value) {
                /** @var AssetCollection $value */
                $ret .= $this->helper($value, $options) . PHP_EOL;
            }
        } else {
            $ret .= $this->helper($asset, $options) . PHP_EOL;
        }
        return $ret;
    }