/** * @throws \LogicException */ protected static function load() { $container = parent::load(); $container['site'] = function ($c) { return new Site(); }; return $container; }
/** * @throws \LogicException */ protected static function load() { $container = parent::load(); $container['site'] = function ($c) { return new Site(); }; $container['menu'] = function ($c) { return new Menu(); }; $container['page'] = function ($c) { return new Page($c); }; return $container; }
/** * @throws \LogicException */ protected static function load() { // Make sure Timber plugin has been loaded. if (!class_exists('Timber')) { throw new \LogicException('Timber not activated. Make sure you activate the plugin in <a href="' . admin_url('plugins.php#timber') . '">' . admin_url('plugins.php') . '</a>'); } $container = parent::load(); $container['site'] = function ($c) { return new Site(); }; $container['page'] = function ($c) { return new Page($c); }; return $container; }
/** * @throws \LogicException */ protected static function load() { $container = parent::load(); $container['site'] = function ($c) { return new Site(); }; $container['menu'] = function ($c) { return new Menu(); }; $container['page'] = function ($c) { return new Page($c); }; $container['global'] = function ($c) { $global = null; // Trigger the event. $dispatcher = \JEventDispatcher::getInstance(); $dispatcher->trigger('onGantryGlobalConfig', ['global' => &$global]); return $global; }; return $container; }
/** * @param string $location * @param bool $force * @return array */ public function scripts($location = 'head', $force = false) { // Do not display head, Joomla will take care of it (most of the time). return !$force && $location == 'head' ? [] : parent::scripts($location); }