Example #1
0
 /**
  * Renders the view
  *
  * @param array $data additional view data
  *
  * @return string
  */
 public function render(array $data = [])
 {
     // run the methods
     $this->before();
     if (method_exists($this, $this->method)) {
         $this->{$this->method}();
     }
     $this->after();
     // transfer the presenter data to the view
     $this->view->merge($this);
     // set autofilter on view
     $this->view->autoFilter($this->autoFilter);
     // render the view
     return $this->view->render($data);
 }