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 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 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; }