You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am preparing a php library that I have developed individually. I use assig to compress twig, css and js files for the theme system in the library.
If you will be responsible for knowledgeable developers; Static file output problem does not occur when using GlobAsset or FileAsset. I get an error when I use twig with filter assetic. Two I've been working on this for days, but I have not found the solution.
I share your source code with you, I hope you can help.
Template.php
static::$fileSystem = new Twig_Loader_Filesystem();
static::$tpl = new Twig_Environment(static::$fileSystem, $configArr);
$am = new AssetManager();
$fm = new FilterManager();
$fm->set('cssrewrite', new CssRewriteFilter());
static::$factory = new AssetFactory('C:/WinNMP/WWW/bulk/css/');
static::$factory->setAssetManager($am);
static::$factory->setFilterManager($fm);
static::$factory->setDebug(true);
static::$factory->addWorker(new AssetVersionWorker('1.0.0'));
//static::$factory->addWorker(new CacheBustingWorker());
$am = new LazyAssetManager(static::$factory);
// enable loading assets from twig templates, caching the formulae
$am->setLoader('twig', new TwigCachingFormulaLoader(static::$tpl));
$templates = array($dir.self::HtmlDir.'/content.twig');
// loop through all your templates
foreach ($templates as $template) {
$resource = new TwigResource(static::$fileSystem, $template);
$am->addResource($resource, 'twig');
}
$writer = new PersistentAssetWriter(Config::get('cache.assets.frontend'));
$writer->writeManagerAssets($am);
static::$tpl->addExtension(new AsseticExtension(static::$factory));
Hello to everyone,
I am preparing a php library that I have developed individually. I use assig to compress twig, css and js files for the theme system in the library.
If you will be responsible for knowledgeable developers; Static file output problem does not occur when using GlobAsset or FileAsset. I get an error when I use twig with filter assetic. Two I've been working on this for days, but I have not found the solution.
I share your source code with you, I hope you can help.
Template.php
header.twig
The text was updated successfully, but these errors were encountered: