ManaPHP\Mvc\View::render PHP Method

render() public method

Shows recent posts view (app/views/posts/recent.phtml) $view->start()->render('posts', 'recent')->finish();
public render ( string $controller, string $action ) : static
$controller string
$action string
return static
    public function render($controller, $action)
    {
        if ($this->_controllerName === null) {
            $this->_controllerName = $controller;
        }
        if ($this->_actionName === null) {
            $this->_actionName = $action;
        }
        $this->fireEvent('view:beforeRender');
        $this->_content = $this->_render("@views/{$this->_controllerName}/" . ucfirst($this->_actionName), $this->_viewVars, false);
        if ($this->_layout !== false) {
            $this->_content = $this->_render('@views/Layouts/' . ucfirst($this->_layout ?: $this->_controllerName), $this->_viewVars, false);
        }
        $this->fireEvent('view:afterRender');
        return $this;
    }