/**
  * Process the template
  * @return boolean|string
  *
  * This function process the template. If $this->renderas is set, it
  * will produce a full page.
  */
 public function fetchPage()
 {
     $data = parent::fetchPage();
     if ($this->renderas) {
         $page = new OC_TemplateLayout($this->renderas, $this->app);
         // Add custom headers
         $page->assign('headers', $this->headers, false);
         foreach (OC_Util::$headers as $header) {
             $page->append('headers', $header);
         }
         $page->assign("content", $data, false);
         return $page->fetchPage();
     } else {
         return $data;
     }
 }
Beispiel #2
0
 /**
  * @brief Proceeds the template
  * @return bool
  *
  * This function proceeds the template. If $this->renderas is set, it
  * will produce a full page.
  */
 public function fetchPage()
 {
     $data = $this->_fetch();
     if ($this->renderas) {
         $page = new OC_TemplateLayout($this->renderas);
         if ($this->renderas == 'user') {
             $page->assign('requesttoken', $this->vars['requesttoken']);
             $page->assign('requestlifespan', $this->vars['requestlifespan']);
         }
         // Add custom headers
         $page->assign('headers', $this->headers, false);
         foreach (OC_Util::$headers as $header) {
             $page->append('headers', $header);
         }
         $page->assign("content", $data, false);
         return $page->fetchPage();
     } else {
         return $data;
     }
 }