예제 #1
0
파일: Theme.php 프로젝트: Tanver186/gantry5
 /**
  * @see AbstractTheme::setTwigLoaderPaths()
  *
  * @param \Twig_Loader_Filesystem $loader
  */
 protected function setTwigLoaderPaths(\Twig_Loader_Filesystem $loader)
 {
     $gantry = static::gantry();
     /** @var UniformResourceLocator $locator */
     $locator = $gantry['locator'];
     $paths = $locator->mergeResources(['gantry-theme://templates', 'gantry-engine://templates']);
     // TODO: right now we are replacing all paths; we need to do better, but there are some issues with this call.
     $loader->setPaths($paths);
     parent::setTwigLoaderPaths($loader);
 }
예제 #2
0
 /**
  * @see AbstractTheme::setTwigLoaderPaths()
  *
  * @param \Twig_Loader_Filesystem $loader
  */
 protected function setTwigLoaderPaths(\Twig_Loader_Filesystem $loader)
 {
     $gantry = static::gantry();
     /** @var UniformResourceLocator $locator */
     $locator = $gantry['locator'];
     $loader->setPaths($locator->findResources('gantry-engine://twig'));
     $loader->setPaths($locator->findResources('gantry-pages://'), 'pages');
     $loader->setPaths($locator->findResources('gantry-positions://'), 'positions');
     parent::setTwigLoaderPaths($loader);
 }
예제 #3
0
파일: Theme.php 프로젝트: legutierr/gantry5
 /**
  * @see AbstractTheme::setTwigLoaderPaths()
  *
  * @param \Twig_LoaderInterface $loader
  */
 protected function setTwigLoaderPaths(\Twig_LoaderInterface $loader)
 {
     if (!$loader instanceof \Twig_Loader_Filesystem) {
         return;
     }
     $gantry = static::gantry();
     /** @var UniformResourceLocator $locator */
     $locator = $gantry['locator'];
     $loader->setPaths($locator->findResources('gantry-engine://twig'));
     parent::setTwigLoaderPaths($loader);
 }