/** * Clear compiled Twig templates * @ignore */ public static function clearCompiledTemplates() { $twig = new Twig(); $twig->getTwigEnvironment()->clearTemplateCache(); }
/** * Clear compiled Twig templates * @ignore */ public static function clearCompiledTemplates() { $twig = new Twig(); $environment = $twig->getTwigEnvironment(); $environment->clearTemplateCache(); $cacheDirectory = $environment->getCache(); if (!empty($cacheDirectory) && is_dir($cacheDirectory)) { $environment->clearCacheFiles(); } }
private function initializeTwig() { $piwikTwig = new Twig(); $this->twig = $piwikTwig->getTwigEnvironment(); }