Render a view.

@param string $view
@param array  $data
@param array  $mergeData

@return string
197752
protected function renderView($view, $data, $mergeData)
    {
        $data = $data ?: [];
        $mergeData = $mergeData ?: [];

        return function () use ($view, $data, $mergeData) {
            return $this->view->make($view, $data, $mergeData)->render();
        };
    }
999111
public function loadView($view, $data = array(), $mergeData = array())
    {
        $this->view = View::make($view, $data, $mergeData);
        return parent::loadView($view, $data, $mergeData);
    }
699458
public function render($view, $data = [], $mergeData = [])
    {
        view()->share('content_class', 'app-content app-content--gridstack page-datatables');
        $this->addFilters();
        return parent::render($view, $data, $mergeData);
    }
1120825
public function renderBody($view, $layout = '//layouts/main', array $data = array())
    {
        $controller = new CController('SwiftMailerComponent');

        $viewPath = Yii::app()->getBasePath() . DIRECTORY_SEPARATOR . 'views';

        $viewFile   = $controller->resolveViewFile($view, $viewPath, $viewPath);
        $layoutFile = $controller->resolveViewFile($layout, $viewPath, $viewPath);

        $body = $controller->renderInternal($viewFile, $data, true);
        if (null !== $layout) {
            $body = $controller->renderInternal($layoutFile, array('content' => $body), true);
        }

        return $body;
    }
492402
public function loadViews($viewNames = array(), $data = array(), $mergeData = array())
    {
        $this->children = array();
        foreach ($viewNames as $key => $viewName) {
            $className = get_class();
            $item = new $className($this->cmd, $this->folder);
            $item->loadView($viewName, $data, $mergeData);
            $this->children[] = $item;
        }

        return $this;
    }
184257
public function string($contents, $unique, $timestamp, $data = [], $mergeData = []) {
        $data = array_merge($mergeData, $this->parseData($data));

        $this->callCreator($view = new StringView($this, $this->engines->resolve('blade.string'), $contents, $unique, $timestamp, $data));

        return $view;
    }
774731
public function render($view, array $data = [])
    {
        // First we need to parse the view, which could either be a string or an array
        // containing both an HTML and plain text versions of the view which should
        // be used when sending an e-mail. We will extract both of them out here.
        [$view, $plain, $raw] = $this->parseView($view);

        $data['message'] = $this->createMessage();

        return $this->renderView($view ?: $plain, $data);
    }
178473
public function cache($data, $view, $mergeData = null, $minutes = null, $key = null, $tag = null)
    {
        if (! $this->enabled) {
            return call_user_func($this->renderView($view, $data, $mergeData));
        }

        $viewKey = $this->getCacheKeyForView($view, $key);

        $mergeData = $mergeData ?: [];

        $tags = $this->getTags($tag);

        $minutes = $this->resolveCacheDuration($minutes);

        if ($this->cacheIsTaggable && $minutes === null) {
            return $this->cache
                ->tags($tags)
                ->rememberForever($viewKey, $this->renderView($view, $data, $mergeData));
        }

        if ($this->cacheIsTaggable) {
            return $this->cache
                ->tags($tags)
                ->remember($viewKey, $minutes, $this->renderView($view, $data, $mergeData));
        }

        if ($minutes === null) {
            return $this->cache
                ->rememberForever($viewKey, $this->renderView($view, $data, $mergeData));
        }

        return $this->cache
            ->remember($viewKey, $minutes, $this->renderView($view, $data, $mergeData));
    }
1370417
public static function render($view = '', $data = array())
    {
        $smarty = new Smarty();
        $smarty->setTemplateDir(self::$path);
        $smarty->setCompileDir(self::$compilePath);
        $smarty->setCacheDir(self::$cachePath);
        $smarty->left_delimiter = '{';
        $smarty->right_delimiter = '}';
        $smarty->debugging = false;
        if (self::$isDebug == true) {
            $smarty->caching = false;
            $smarty->clearAllCache();
            $smarty->clearCompiledTemplate($view);
        } else {
            $smarty->caching = true;
        }
        if (is_array($data)) {
            foreach ($data as $key => $value) {
                $smarty->assign($key, $value);
            }
        }
        $view .= '.tpl';
        $smarty->display($view);
        return null;
    }
824153
public function create($view, $data = [])
    {
        $filename = $this->getFinder()->find($view);

        $mergeMethod = ($data instanceof Data) ? 'addAll' : 'merge';

        $this->getData()->$mergeMethod($data);

        return new View($filename, $this->getData(), new Context($this));
    }
632314
protected function render($view,$data)
	{
		$app=Yii::app();
		$isAjax=$app->getRequest()->getIsAjaxRequest();
		$isFlash=$app->getRequest()->getIsFlashRequest();

		if($this->showInFireBug)
		{
			// do not output anything for ajax and/or flash requests if needed
			if($isAjax && $this->ignoreAjaxInFireBug || $isFlash && $this->ignoreFlashInFireBug)
				return;
			$view.='-firebug';
			if(($userAgent=$app->getRequest()->getUserAgent())!==null && preg_match('/msie [5-9]/i',$userAgent))
			{
				echo '<script type="text/javascript">';
				echo file_get_contents(dirname(__FILE__).'/../vendors/console-normalizer/normalizeconsole.min.js');
				echo "</script>\n";
			}
		}
		elseif(!($app instanceof CWebApplication) || $isAjax || $isFlash)
			return;

		$viewFile=YII_PATH.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.$view.'.php';
		include($app->findLocalizedFile($viewFile,'en'));
	}
1174235
public function render($file, $data = array(), $merge = true, $default = '')
    {
        settype($data, 'array');
        $templates = $this->getTemplateFiles($file);

        if ($merge) {
            $data = array_merge($data, $this->getDefaultData());
        }

        $rendered = null;
        $this->hook->attach('template.render', $templates, $data, $rendered, $this);

        if (isset($rendered)) {
            return trim($rendered);
        }

        list($original, $overridden) = $templates;

        if (is_file("$overridden.php")) {
            $template = "$overridden.php";
        } else if (is_file("$original.php")) {
            $template = "$original.php";
        } else {
            return $default;
        }

        $rendered = $this->renderPhpTemplate($template, $data);
        return trim($rendered);
    }
79118
public function view($view, array $data = [], $mergeData = [])
    {
        $data['template'] = $this;

        if ($view instanceof View) {
            return $view->with($data);
        }

        return view($this->getViewPath($view), $data, $mergeData);
    }
44030
public static function view(string $view = null, array $data = [], array $mergeData = []): Renderable
    {
        return view(self::NAME . '::' . $view, $data, $mergeData);
    }
1286265
public function render(string $view = null, array $data = [], string $formAction = ''): string
    {
        if (!$this->_data) {
            return '';
        }

        return $this->_data->setPath($formAction)->appends($data)->render($view)->toHtml();
    }
367294
public function render($view, $data = [], $mergeData = [])
    {
        if ($this->request()->ajax() && $this->request()->wantsJson()) {
            return app()->call([$this, 'ajax']);
        }

        if ($action = $this->request()->get('action') and in_array($action, $this->actions)) {
            if ($action == 'print') {
                return app()->call([$this, 'printPreview']);
            }

            return app()->call([$this, $action]);
        }

        return view($view, $data, $mergeData)->with($this->dataTableVariable, $this->getHtmlBuilder());
    }
593471
public function file( $path, $data = [], $mergeData = [] )
	{
		$data = array_merge( $mergeData, $this->parseData( $data ) );

		$this->callCreator( $view = new View( $this, $this->getEngineFromPath( $path ), $path, $path, $data ) );

		return $view;
	}