Renders a page

@param string $template The template to render
@param array  $data     The template variables

@return string The rendered page
486427
public function renderPage(string $template, array $data = []): string
    {
        $this->thisShouldMakeItUniqueCodeCollabTemplateHtmlVariables = $data;

        /** @noinspection PhpUnusedLocalVariableInspection */
        $content = $this->render($template, $data);

        try {
            ob_start();

            /** @noinspection PhpIncludeInspection */
            require $this->thisShouldMakeItUniqueCodeCollabTemplateHtmlBasePage;
        } finally {
            $output = ob_get_clean();
        }

        return $output;
    }
901996
public function display($template, $data = NULL)
    {
        $app = App::getInstance();
        $data = $this->data->all();
        unset($data['flash']);
        unset($data['app']);
        foreach (array_keys($data) as $key) {
            if ($key[0] === '_') {
                unset($data[$key]);
            }
        }

        $app->response->headers['content-type'] = $this->contentType;
        echo \JsonKit\JsonKit::encode($data);
    }
1118693
public function render($template, $data = [], array $options = []) {
		$defaults = ['context' => []];
		$options += $defaults;

		$context = [];
		$this->_context = $options['context'] + $this->_context;

		foreach (array_keys($this->_context) as $key) {
			$context[$key] = $this->__get($key);
		}
		$data = array_merge($this->_toString($context), $this->_toString($data));
		return Text::insert($template, $data, $options);
	}
846172
public function render(string $view, array $data = []): string
    {
        return $this->native()->render(
            $this->path($view),
            $data
        );
    }
113149
public static function nativeRender($template = '', $data = [])
    {
        $templatesPath = realpath(__DIR__ . '/../templates');
        $templates     = new \League\Plates\Engine($templatesPath);

        return $templates->render($template, $data);
    }
10723
public function render($template, $data = array()) {
		if(!is_null($this->layout) && $this->enabled === TRUE) { // Render the layout!!
			$this->setLayoutData('content', parent::render($template, array_merge($this->layoutData, (array)$data)));
			$this->setLayoutData('js', $this->jsAssets->render());
			$this->setLayoutData('css', $this->cssAssets->render());
			$this->setLayoutData('title', $this->titleParts->render());

			return parent::render($this->layout, $this->layoutData);
		} else {
			return parent::render($template, $data);
		}
	}
674536
public function textTemplate($template, $data=[]) {
		$data['message'] = $this;
		$res = $this->buildTemplate($template, $data);
		return $this->text($res);
	}
1270713
public function renderHtml($template=null, $data=null)
    {
        $this->beforeRender($data);
        
        $this->beforeRenderView();
        
        $template = !empty($template) ? $template : $this->getName();
        
        $string = $this->module->getView()->render($template, $this->responseData());
        
        return $this->renderText($string);
    }
77634
public function render($view, array $data = null)
    {
        if (!headers_sent()) {
            foreach ($this->_headers as $header) {
                header($header, true);
            }
        }

        if ($data) {

            if (!empty($this->vars)) {
                // Overlay data config
                $this->vars = array_replace($this->vars, $data);
            } else {
                $this->vars = $data;
            }

        }

        $this->view = $view;
        $path = '../App/' . $this->templatesDir . $this->template . '.phtml';

        if (file_exists($path)) {
            require $path;
        } else {
            die('No template file ' . $this->template . ' present in template directory.');
        }

        return true;
    }
661230
public function render($template, array $data = array(), $output = false)
    {
        foreach ($data as $k => $v) {
            $this->assign($k, $v);
        }
        ob_start();
        include $this->compiled($template);
        return $output ? ob_end_flush() : ob_get_clean();
    }
168647
public function render($template, array $data = [])
    {
        if (is_null($this->loader)) {
            return $this->renderString($template, $data);
        }

        if (! $this->loader->exists($template)) {
            $this->loader->failLoading($template .' not found');
        }

        $this->pushSharedData($data);

        $__tintin = $this;

        extract($this->getSharedData());

        /**
         * Load template when is not a cached file
         */
        if (! $this->loader->isExpirated($template)) {
            $this->obFlushAndStar();

            require $this->loader->getCacheFileResolvedPath($template);
            
            return $this->obGetContent();
        }

        /**
         * Put the template into cache
         */
        $content = $this->loader->getFileContent($template);

        $this->loader->cache(
            $template,
            $this->compiler->compile($content)
        );

        $this->obFlushAndStar();

        require $this->loader->getCacheFileResolvedPath($template);

        return $this->obGetContent();
    }
667356
protected function render($template, $data = [])
    {
        $view = new View();
        $view->type(View::VIEW_TYPE_CELL);
        $view->set($data);
        $className = get_class($this);
        $namePrefix = '\View\Cell\\';
        $name = substr($className, strpos($className, $namePrefix) + strlen($namePrefix));
        $view->context(str_replace('\\', DIRECTORY_SEPARATOR, $name));
        return $view->render($template);
    }
20290
public function render($name, array $data = [])
    {
        
        //$templatePath = $this->manager->pathByName($name);
        $template = $this->twig->load($name);
        return $template->render($data);
    }
1220429
protected function render(array $data = [], $template = null)
    {
        if (!$template) {
            $template = $this->template;
        }

        $template = (!empty($template)) ? $template : $this->router->directory . $this->router->class . '/' . $this->router->method;
        $data = array_merge($this->data, $data);
        if ($this->input->is_ajax_request()) {
            $this->layout = false;
        } else {
            if (!isset($data['page_title'])) {
                $data['page_title'] = 'lang:' . $this->router->class . '_title_' . $this->router->method;
            }
        }
        $view = new View($this->layout);
        $view->set($data);
        $this->output->set_output($view->render($template));

        if ($this->layout && ($csp = config_item('csp_protection'))) {
            // Add CSP
            if (!isset($csp['script-src'])) {
                $csp['script-src'] = ['self'];
            }
            $asset = Asset::getInstance();
            foreach ($asset->getScriptNonces() as $nonce) {
                $csp['script-src'][] = "'nonce-".$nonce."'";
            }
            $string = '';
            foreach ($csp as $key => $values) {
                $string .= " " . $key . " " . implode(" ", $values) .";";
            }
            if ($report = config_item('csp_report')) {
                $string .= " report-uri " . $report;
            }
            if (config_item('csp_report_only')) {
                $this->output->set_header('Content-Security-Policy-Report-Only:'. $string);
                //var_dump($csp);die;
            } else {
                $this->output->set_header('Content-Security-Policy:'. $string);
            }
        }
    }
1269576
protected function render($template, $data = array()) {
        Router::getInstance()->render($template, $data);
        $response = ob_get_contents();
        return ob_get_clean();
    }
687963
public function render(View $template, array $data = array())
    {
        if (! empty($this->data)) { // @codeCoverageIgnore
            $data = array_merge($this->data, $data); // @codeCoverageIgnore
        } // @codeCoverageIgnore

        // Path
        $path = $template->getFullPath();

        // Declare all data vars local if possible
        foreach ($data as $name => $value) {
            ${$name} = $value;
        }

        // Require and stop with OB.
        ob_start();

        require $path;

        return ob_get_clean();
    }
825380
public function view($template, $data = [])
    {
        $html = ViewService::getEngine()->render($template, $data);
        $this->message->setBody($html, 'text/html');
        return $this;
    }