Airship\Engine\Lens::unsafeDisplay PHP Method

unsafeDisplay() public method

Render a template and print out its contents without sanity checks.
public unsafeDisplay ( string $file, array $params = [], string $mime = 'text/html;charset=UTF-8' ) : boolean
$file string Template to render (e.g. 'index' or 'dir/index')
$params array Parameters to pass towards the array
$mime string MIME type
return boolean
    public function unsafeDisplay(string $file, array $params = [], string $mime = 'text/html;charset=UTF-8') : bool
    {
        if (!\headers_sent()) {
            $this->sendStandardHeaders($mime);
            \ob_start();
            // We need to render this to make sure our CSP headers send!
            echo $this->twigEnv->render($file, $params);
            \ob_end_flush();
            return true;
        }
        echo $this->twigEnv->render($file, $params);
        return true;
    }