/** * @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; }
/** * @param array $context * @return array */ public function getContext(array $context) { $context = parent::getContext($context); $gantry = Gantry::instance(); $context['site'] = $gantry['site']; if (!$this->user) { $this->user = new \TimberUser(); } $context['current_user'] = $this->user; if (function_exists('is_rtl')) { $context['is_rtl'] = is_rtl(); } return $context; }