Exemplo n.º 1
0
 public function view()
 {
     if (!$this->data->layout) {
         throw new Exception("layout not set.");
     }
     $context = Timber::get_context();
     $context['globals'] = Yare::globals();
     $context[$this->data->name] = $this->data;
     Timber::render($this->data->layout, $context);
 }