Esempio n. 1
0
 /**
  * use AppView for render view
  * if viewVars has key 'data' using json or xml
  *
  * @param $action
  * @param $path with DS end
  * @override method
  */
 public function render($action = null, $path = null)
 {
     if ($this->_hasRendered) {
         return $this->output;
     }
     $this->beforeRender();
     $this->Component->beforeRender($this);
     if (is_null($this->view)) {
         App::import("vendor", "inc/view");
         try {
             $this->view = AppView::getInstance($this->params['url']['ext'], $this);
             $this->output .= $this->view->render($action, $path);
         } catch (AppViewException $e) {
             $this->_stop();
         }
     }
     $this->_hasRendered = true;
     return $this->output;
 }