src/View/BasicViewAbstract.php
public function getContentWithTemplate() {
        $vars = $this->viewVars;
        //If there is vars to assign.
        if (is_array($vars)) {
            foreach ($vars as $key => $value) {
                /* @var $value BasicViewInterface */
                //If is a view, get the content of the view.
                if (is_object($value) && is_a($value, '\Mmf\View\BasicViewInterface')) {
                    $$key = $value->getContentView();
                } else {
                    $$key = $value;
                }
            }
        }

        $content = $this->getContentView();
        if ($this->template == "") {
            $output = $content;
        } else {
            $scripts = '';
            if (strlen($this->scriptVars) > 0) {
                $scripts = "<script>/* Global Vars */".$this->scriptVars."</script>";
            }
            $styles = $this->getAllCss();
            $scripts .= $this->getAllScripts();
            ob_start();
            $path = $this->viewsFolder . '/template/' . $this->template;

            if (file_exists($path)) {
                /** @noinspection PhpIncludeInspection */
                include ($path);
            } else {
                $output = ob_get_clean();
                throw new \Exception('Template does not exists', 1502);
            }

            $output = ob_get_clean();
        }
        return $output;
    }
public function getContentWithTemplate() {
        $vars = $this->viewVars;
        //If there is vars to assign.
        if (is_array($vars)) {
            foreach ($vars as $key => $value) {
                /* @var $value BasicViewInterface */
                //If is a view, get the content of the view.
                if (is_object($value) && is_a($value, '\Mmf\View\BasicViewInterface')) {
                    $$key = $value->getContentView();
                } else {
                    $$key = $value;
                }
            }
        }

        $content = $this->getContentView();
        if ($this->template == "") {
            $output = $content;
        } else {
            $scripts = '';
            if (strlen($this->scriptVars) > 0) {
                $scripts = "<script>/* Global Vars */".$this->scriptVars."</script>";
            }
            $styles = $this->getAllCss();
            $scripts .= $this->getAllScripts();
            ob_start();
            $path = $this->viewsFolder . '/template/' . $this->template;

            if (file_exists($path)) {
                /** @noinspection PhpIncludeInspection */
                include ($path);
            } else {
                $output = ob_get_clean();
                throw new \Exception('Template does not exists', 1502);
            }

            $output = ob_get_clean();
        }
        return $output;
    }
Get the view content but included into a template.

@return string
@throws Exception