/** * 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); $this->parse_includes($result); $this->parse_nestedcontrols_cdata($result); $this->data['_extracted_content'] = $this->_extracted_content; $result = render_fragment($result, $this->data); $this->parse_layout($result, $subview); $this->parse_subviews($result); $this->parse_other_tags($result); $this->parse_targets($result); $this->parse_uses($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; }
/** * Renders and displays the ajax view. */ public function render($data = null, $subview = false) { if ($data != null) { $this->data = $data; } else { $this->data = array(); } $result = get_view($this->base_path . $this->view_name); $this->parse_helpers($result); $result = render_fragment($result, $this->data); $this->parse_subviews($result); $this->parse_uses($result); $this->parse_controls($result); $this->parse_nestedcontrols($result); $this->parse_other_tags($result); return $result; }
/** * Renders a snippet * @param $snippet * @param $data */ function render_snippet($snippet, $data) { $snippet = parse_view($snippet); return render_fragment($snippet, $data); }
/** * Renders a view * * @param string $view The full path to the view to render * @param array $data The data to pass into the view * @return string The rendered view */ function render_view($view, &$data) { $contents = get_view($view); return render_fragment($contents, $data); }