Exemplo n.º 1
0
 /**
  * @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;
 }
Exemplo n.º 2
0
 /**
  * @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;
 }