Esempio n. 1
0
 /**
  * @see AbstractTheme::getContext()
  *
  * @param array $context
  * @return array
  */
 public function getContext(array $context)
 {
     $gantry = static::gantry();
     $context = parent::getContext($context);
     $context['site'] = $gantry['site'];
     return $context;
 }
Esempio n. 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);
 }
Esempio n. 3
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'];
     $paths = $locator->mergeResources(['gantry-theme://views', 'gantry-engine://views']);
     // 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);
 }
Esempio n. 4
0
 /**
  * @see AbstractTheme::init()
  */
 protected function init()
 {
     parent::init();
     $this->url = \Mage::getBaseUrl(\Mage_Core_Model_Store::URL_TYPE_SKIN);
 }
Esempio n. 5
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'));
     parent::setTwigLoaderPaths($loader);
 }
Esempio n. 6
0
 /**
  * @see AbstractTheme::init()
  */
 protected function init()
 {
     parent::init();
     $this->url = './styles/' . $this->name;
 }