示例#1
0
 /**
  * @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'));
     $loader->setPaths($locator->findResources('gantry-pages://'), 'pages');
     $loader->setPaths($locator->findResources('gantry-positions://'), 'positions');
     parent::setTwigLoaderPaths($loader);
 }
示例#2
0
 /**
  * @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'];
     $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);
 }
示例#3
0
 /**
  * @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-admin://templates'));
     $loader->setPaths($locator->findResources('gantry-admin://templates'), 'gantry-admin');
 }
示例#4
0
 public function setBasePath($path, $classPrefix = 'Zend_View')
 {
     $this->loader->setPaths($path);
 }