Render the template and layout.
@param  array  $data
@throws \Throwable
@throws \Exception
@return string
7468
public function render(array $data = [])
    {
        $this->data($data);
        unset($data);
        extract($this->data);

        if (! $this->exists()) {
            throw new LogicException(
                'The template "'.$this->name->getName().'" could not be found at "'.$this->path().'".'
            );
        }

        try {
            $level = ob_get_level();
            ob_start();

            include $this->path();

            $content = ob_get_clean();

            if (isset($this->layoutName)) {
                $layout = $this->engine->make($this->layoutName);
                $layout->setFile($this->file);
                $layout->sections = array_merge($this->sections, ['content' => $content]);
                $content = $layout->render($this->layoutData);
            }

            return $content;
        } catch (Throwable $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }

            throw $e;
        } catch (Exception $e) {
            while (ob_get_level() > $level) {
                ob_end_clean();
            }

            throw $e;
        }
    }
107545
public function render(array $data = [])
	{
		// run the methods
		$this->before();

		if (method_exists($this, $this->method))
		{
			$this->{$this->method}();
		}

		$this->after();

		// transfer the presenter data to the view
		$this->view->merge($this);

		// set autofilter on view
		$this->view->autoFilter($this->autoFilter);

		// render the view
		return $this->view->render($data);
	}
1314969
protected function renderHtml($name = null, $data = []) {
        if (is_array($name)) {
            $data = $name;
            $name = null;
        }
        return $this->renderFile($this->getViewFile($name), $data);
    }
271504
public function render($view, array $data = array())
    {
        $original_view = $this->view;

        if (!empty($data)) {
            $this->shared_data->merge($data);
        }

        $this->view = $view;

        if (null === $this->layout) {
            $this->yieldView();
        } else {
            require $this->layout;
        }

        if (false !== $this->response->chunked) {
            $this->response->chunk();
        }

        // restore state for parent render()
        $this->view = $original_view;
    }
1189369
public function renderMessageBox($data=null)
	{
	    $needData = [
	        'url'      => '_stop',
	        'rootUrl'  => Config::getRootUrl(),
	        'errtype'  => '提示'
	    ];
	    
	    $data = $data ? : [];
	    $data = array_merge($needData, $data);
	    $template = $this->getMessageBoxTemplate();
	    return $this->setLayout(null)->render($template, $data);
	}
948594
public function render($content, $data = [])
    {
        if (!$content) {
            return '';
        }

        $html = $this->renderTwig($content, $data);

        $html = Markdown::parseSafe($html);

        return $html;
    }
1253294
protected function renderXml($data)
    {
        $xml = $this->arrayToXml($data);

        $dom = new \DOMDocument('1.0');
        $dom->preserveWhiteSpace = false;
        $dom->formatOutput = $this->pretty;
        $dom->loadXML($xml->asXML());

        return $dom->saveXML();
    }
1280854
public function render($templates, array $data = array())
    {
        $templates = (array) $templates;

        foreach ($templates as $template) {
            if (!is_readable($template) || !is_file($template)) {
                throw new \Shade\Exception('Template file "'.$template.'" does not exists');
            }
            $content = str_replace(array_keys($data), $data, file_get_contents($template));
            $data[$this->layoutContentPlaceholder] = $content;
        }

        return $content;
    }
540188
public function template($template, $data = [])
    {
        $templatePath = self::$instance->app->findTemplate($template);
        echo self::$instance->renderTemplate($templatePath, $data);
    }
406505
public function render($view, array $data = null)
	{
		$engine = new Engine($this->templatePath);
		$template = new Template($engine);
		return $template->render($view, $data);
	}
1269576
protected function render($template, $data = array()) {
        Router::getInstance()->render($template, $data);
        $response = ob_get_contents();
        return ob_get_clean();
    }
950247
protected function render($template, $data = null)
    {
        $twigView = $this->container->view;

        // By making page data a Twig Global, we can access page data in block elements
        // which are loaded by a Twig function
        $twigEnvironment = $twigView->getEnvironment();
        $twigEnvironment->addGlobal('page', $data);
        $twigEnvironment->addGlobal('alert', $this->alert);

        return $twigView->render($this->response, $template);
    }
391860
public function render(array $data, ContextInterface $context)
    {
        $data = optionsParser($data, [
            'name' => '',
            'val' => null,
            'type' => 'text',
            'escape' => true,
            'templateVars' => [],
        ]);
        $data->add('value', $data->consume('val'));

        return $this->_templates->format('hidden', [
            'name' => $data->get('name'),
            'type' => $data->get('type'),
            'templateVars' => $data->get('templateVars'),
            'attrs' => $this->_templates->formatAttributes($data->toArray(), ['name', 'type']),
        ]);
    }
366676
protected function parseTemplateData($data = [])
    {
        $error = $this->getThrown();

        $html = $this->renderHtmlError($error);
        while ($error = $error->getPrevious()) {
            $html .= '<h2>'.$this->translator()->translate('Previous error').'</h2>';
            $html .= $this->renderHtmlError($error);
        }

        $data['htmlErrorDetails']    = $html;
        $data['displayErrorDetails'] = $this->displayErrorDetails() && !empty($html);

        return parent::parseTemplateData($data);
    }
858336
public function render(string $template, array $data = []) : string
    {
        try {
            return $this->renderer->render($template, $data);
        } catch (Twig_Error_Loader $e) {
            throw new TemplateNotFoundException("Template '$template' not found by Twig renderer",
                null, $e);
        }
    }
608891
protected function renderTemplate($data, array $options)
    {
        return $this->twig->render(
            $options['template'],
            array_merge($options['context'], ['column' => $options['column'], 'data' => $data])
        );
    }
1334734
public function render($data = [])
    {
        $this->registerPaths();

        $data = new Data($data);

        $this->prepareData($data);

        $this->prepareGlobals($data);

        if ($this->isDebug()) {
            $data->paths = iterator_to_array(clone $this->getPaths());
        }

        return $this->renderer->render($this->layout, $data);
    }