Ejemplo n.º 1
0
 public function add_to_context(array $context)
 {
     $context = parent::add_to_context($context);
     $this->url = $context['site']->theme->link;
     $context['menu'] = new \TimberMenu();
     $context['my'] = new \TimberUser();
     return $context;
 }
Ejemplo n.º 2
0
 public function init()
 {
     parent::init();
     \JPluginHelper::importPlugin('gantry5');
     // Trigger the onGantryThemeInit event.
     $dispatcher = \JEventDispatcher::getInstance();
     $dispatcher->trigger('onGantry5ThemeInit', ['theme' => $this]);
 }
Ejemplo n.º 3
0
 public function add_to_context(array $context)
 {
     if (!$this->user) {
         $this->user = new \TimberUser();
     }
     $context = parent::add_to_context($context);
     $this->url = $context['site']->theme->link;
     $context['my'] = $this->user;
     return $context;
 }
Ejemplo n.º 4
0
 public function init()
 {
     parent::init();
     $gantry = Gantry::instance();
     /** @var UniformResourceLocator $locator */
     $locator = $gantry['locator'];
     \JPluginHelper::importPlugin('gantry5');
     // Trigger the onGantryThemeInit event.
     $dispatcher = \JEventDispatcher::getInstance();
     $dispatcher->trigger('onGantry5ThemeInit', ['theme' => $this]);
     $lang = \JFactory::getLanguage();
     // FIXME: Do not hardcode this file.
     $lang->load('files_gantry5_nucleus', JPATH_SITE);
     if (\JFactory::getApplication()->isSite()) {
         // Load our custom positions file as frontend requires the strings to be there.
         $filename = $locator("gantry-theme://language/en-GB/en-GB.tpl_{$this->name}_positions.ini");
         if ($filename) {
             $lang->load("tpl_{$this->name}_positions", dirname(dirname(dirname($filename))), 'en-GB');
         }
     }
 }
Ejemplo n.º 5
0
 public function add_to_context(array $context)
 {
     $context = parent::add_to_context($context);
     $this->url = $context['site']->theme->link;
     return $context;
 }
Ejemplo n.º 6
0
 public function add_to_context(array $context)
 {
     $context = parent::add_to_context($context);
     $this->url = $context['site']->theme->link;
     if (!$this->user) {
         $this->user = new \TimberUser();
     }
     $context['current_user'] = $this->user;
     if (function_exists('is_rtl')) {
         $context['is_rtl'] = is_rtl();
     }
     return $context;
 }
Ejemplo n.º 7
0
 public function add_to_context(array $context)
 {
     $context = parent::add_to_context($context);
     return $context;
 }
Ejemplo n.º 8
0
 public function __construct($path, $name = '')
 {
     parent::__construct($path, $name);
     $this->url = dirname($_SERVER['SCRIPT_NAME']);
 }
Ejemplo n.º 9
0
 public function __construct($path, $name = '')
 {
     parent::__construct($path, $name);
     $this->url = \Mage::getBaseUrl(\Mage_Core_Model_Store::URL_TYPE_SKIN);
 }
Ejemplo n.º 10
0
 public function add_to_twig(\Twig_Environment $twig, \Twig_Loader_Filesystem $loader = null)
 {
     parent::add_to_twig($twig, $loader);
 }