예제 #1
0
 /**
  * Initialize $this->view (unless already initialized) and return it.
  * @return waSmarty3View
  */
 protected function getView()
 {
     if (!$this->view) {
         $this->view = waSystem::getInstance()->getView();
         $this->view->assign('action', $this);
     }
     return $this->view;
 }
예제 #2
0
 public function display()
 {
     if ($this->layout && $this->layout instanceof waLayout) {
         $this->layout->setBlock('content', $this->view->fetch($this->getTemplate()));
         $this->layout->display();
     } else {
         waSystem::getInstance()->getResponse()->sendHeaders();
         $this->view->display($this->getTemplate());
     }
 }
 public function display()
 {
     $this->execute();
     $this->view->assign($this->blocks);
     waSystem::getInstance()->getResponse()->sendHeaders();
     $this->view->cache(false);
     if ($this->view->autoescape() && $this->view instanceof waSmarty3View) {
         $this->view->smarty->loadFilter('pre', 'content_nofilter');
     }
     $this->view->display($this->getTemplate());
 }
예제 #4
0
 public function display()
 {
     $this->execute();
     $this->view->assign($this->blocks);
     if (wa()->getEnv() == 'frontend' && waRequest::param('theme_mobile') && waRequest::param('theme') != waRequest::param('theme_mobile')) {
         wa()->getResponse()->addHeader('Vary', 'User-Agent');
     }
     wa()->getResponse()->sendHeaders();
     $this->view->cache(false);
     if ($this->view->autoescape() && $this->view instanceof waSmarty3View) {
         $this->view->smarty->loadFilter('pre', 'content_nofilter');
     }
     $this->view->display($this->getTemplate());
 }