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; }
public function init() { parent::init(); \JPluginHelper::importPlugin('gantry5'); // Trigger the onGantryThemeInit event. $dispatcher = \JEventDispatcher::getInstance(); $dispatcher->trigger('onGantry5ThemeInit', ['theme' => $this]); }
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; }
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'); } } }
public function add_to_context(array $context) { $context = parent::add_to_context($context); $this->url = $context['site']->theme->link; return $context; }
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; }
public function add_to_context(array $context) { $context = parent::add_to_context($context); return $context; }
public function __construct($path, $name = '') { parent::__construct($path, $name); $this->url = dirname($_SERVER['SCRIPT_NAME']); }
public function __construct($path, $name = '') { parent::__construct($path, $name); $this->url = \Mage::getBaseUrl(\Mage_Core_Model_Store::URL_TYPE_SKIN); }
public function add_to_twig(\Twig_Environment $twig, \Twig_Loader_Filesystem $loader = null) { parent::add_to_twig($twig, $loader); }