Example #1
0
 /**
  * Renders and displays the multiview.
  */
 public function render($data = null, $subview = false)
 {
     if ($data != null) {
         $this->data = $data;
     } else {
         $this->data = array();
     }
     $this->data['layout'] = $this;
     $result = get_view($this->base_path . $this->view_name);
     Collector::View($this->base_path . $this->view_name, $result);
     $this->parse_nestedcontrols_cdata($result);
     $this->data['_extracted_content'] = $this->_extracted_content;
     $this->parse_helpers($result);
     $result = render_fragment($result, $this->data);
     $this->parse_layout($result, $subview);
     $this->parse_includes($result);
     $this->parse_subviews($result);
     $this->parse_other_tags($result);
     $this->parse_targets($result);
     $this->parse_uses($result);
     $this->parse_ports($result);
     $this->parse_controls($result);
     $this->parse_nestedcontrols($result);
     if ($this->layout != null) {
         $this->layout->add_content($this->target, $result);
         $result = $this->layout->render($data);
     }
     return $result;
 }