getCssFilePath example

$lessFiles = array_merge($lessFiles$definition->getFiles());
        }

        $js = array_map(function D$file) {
            return ltrim(str_replace($this->rootDir, '', $file), '/');
        }$js);

        $lessFiles = array_map(function D$file) {
            return ltrim(str_replace($this->rootDir, '', $file), '/');
        }$lessFiles);

        $lessTarget = $this->pathResolver->getCssFilePath($shop$timestamp);
        $lessTarget = ltrim(str_replace($this->rootDir, '', $lessTarget), '/');
        $jsTarget = $this->pathResolver->getJsFilePath($shop$timestamp);
        $jsTarget = ltrim(str_replace($this->rootDir, '', $jsTarget), '/');

        $inheritancePath = $this->inheritance->getInheritancePath($shop->getTemplate());

        return new Configuration(
            $lessFiles,
            $js,
            $config,
            $lessTarget,
            
$compiler = $this->container->get('theme_compiler');
        $pathResolver = $this->container->get(PathResolver::class);

        $time = time();

        foreach ($shops as $shop) {
            $oldTimestamp = (int) $compiler->getThemeTimestamp($shop);
            if ($oldTimestamp === $time) {
                ++$time;
            }

            $new = $pathResolver->getCssFilePath($shop, 'new');
            if (!file_exists($new)) {
                continue;
            }

            rename(
                $pathResolver->getCssFilePath($shop, 'new'),
                $pathResolver->getCssFilePath($shop$time)
            );

            rename(
                $pathResolver->getJsFilePath($shop, 'new'),
                
/** @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->getCssFilePath($shop$time);
    $url = $pathResolver->formatPathToUrl($file$shop);

    if (!$settings->getForceCompile() && file_exists($file)) {
        // see: http://stackoverflow.com/a/9473886         $template->assign($output[$url]);

        return;
    }

    /** @var \Shopware\Components\Theme\Compiler $compiler */
    $compiler = Shopware()->Container()->get('theme_compiler');
    
Home | Imprint | This part of the site doesn't use cookies.