public function makeLayout($name = null, $params = [], $throwException = true)
    {
        $layout = $name ?? $this->layout;
        if ($layout == '') {
            return '';
        }

        $layoutPath = $this->getViewPath($layout . '.htm', $this->layoutPath);

        if (!File::exists($layoutPath)) {
            if ($throwException) {
                throw new SystemException(Lang::get('cms::lang.layout.not_found_name', ['name' => $layoutPath]));
            }

            return false;
        }

        return $this->makeFileContents($layoutPath, $params);
    }
public function makeLayout($name = null, $params = [], $throwException = true)
    {
        $layout = $name ?? $this->layout;
        if ($layout == '') {
            return '';
        }

        $layoutPath = $this->getViewPath($layout . '.htm', $this->layoutPath);

        if (!File::exists($layoutPath)) {
            if ($throwException) {
                throw new SystemException(Lang::get('cms::lang.layout.not_found_name', ['name' => $layoutPath]));
            }

            return false;
        }

        return $this->makeFileContents($layoutPath, $params);
    }
public function makeLayout ( $ name = null , $ params = [ ] , $ throwException = true ) { $ layout = $ name ?? $ this -> layout ; if ( $ layout == '' ) { return '' ; } $ layoutPath = $ this -> getViewPath ( $ layout . '.htm' , $ this -> layoutPath ) ; if ( ! File :: exists ( $ layoutPath ) ) { if ( $ throwException ) { throw new SystemException ( Lang :: get ( 'cms::lang.layout.not_found_name' , [ 'name' => $ layoutPath ] ) ) ; } return false ; } return $ this -> makeFileContents ( $ layoutPath , $ params ) ; }
Render a layout.
@param string $name Specifies the layout name.
If this parameter is omitted, the $layout property will be used.
@param array $params Parameter variables to pass to the view.
@param bool $throwException Throw an exception if the layout is not found
@return mixed The layout contents, or false.
Render a layout .