예제 #1
0
파일: Theme.php 프로젝트: Tanver186/gantry5
 /**
  * @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;
 }
예제 #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 프로젝트: rishiv3/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://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);
 }
예제 #4
0
파일: Theme.php 프로젝트: legutierr/gantry5
 /**
  * @see AbstractTheme::init()
  */
 protected function init()
 {
     parent::init();
     $this->url = \Mage::getBaseUrl(\Mage_Core_Model_Store::URL_TYPE_SKIN);
 }
예제 #5
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);
 }
예제 #6
0
파일: Theme.php 프로젝트: legutierr/gantry5
 /**
  * @see AbstractTheme::init()
  */
 protected function init()
 {
     parent::init();
     $this->url = './styles/' . $this->name;
 }