public static function view($path, $model = null) {
        if (($viewPath = PathUtility::getViewFilePath($path)) !== false) {
            $viewResult = new ViewResult($viewPath, $model);
            $viewContext = InternalHelper::makeViewContext(
                $viewPath, 
                self::$viewContext,
                $viewResult,
                $model,
                null,
                self::$parentActionViewContext,
                self::$viewContext,
                null
            );

            return $viewContext->content; //InternalHelper::getViewContent($viewPath, self::$viewContext, $model);
        }
        else {
            throw new ViewNotFoundException($path);
        }
    }
public static function view($path, $model = null) {
        if (($viewPath = PathUtility::getViewFilePath($path)) !== false) {
            $viewResult = new ViewResult($viewPath, $model);
            $viewContext = InternalHelper::makeViewContext(
                $viewPath, 
                self::$viewContext,
                $viewResult,
                $model,
                null,
                self::$parentActionViewContext,
                self::$viewContext,
                null
            );

            return $viewContext->content; //InternalHelper::getViewContent($viewPath, self::$viewContext, $model);
        }
        else {
            throw new ViewNotFoundException($path);
        }
    }
public static function view ( $ path , $ model = null ) { if ( ( $ viewPath = PathUtility :: getViewFilePath ( $ path ) ) !== false ) { $ viewResult = new ViewResult ( $ viewPath , $ model ) ; $ viewContext = InternalHelper :: makeViewContext ( $ viewPath , self :: $ viewContext , $ viewResult , $ model , null , self :: $ parentActionViewContext , self :: $ viewContext , null ) ; return $ viewContext -> content ; //InternalHelper::getViewContent($viewPath, self::$viewContext, $model); } else { throw new ViewNotFoundException ( $ path ) ; } }
Returns the specified view as an HTML-encoded string.

@param string $path The name or file path of the view.
@param string $model The model.

@return string
Returns the specified view as an HTML - encoded string .