Renders the output based on the given template file name and the key/value pairs.

@param string $filename File name of the view template
@return string Output generated by the template
@throws MW_View_Exception If the template isn't found
515189
public function render( $filename )
	{
		try
		{
			ob_start();

			$this->_include( $filename );

			return ob_get_clean();
		}
		catch( Exception $e )
		{
			ob_end_clean();
			throw $e;
		}
	}
843985
private function getListTemplateFromConfigName($viewName)
    {
        if (isset($this->viewToListViewMapping[$viewName])) {
            return $this->viewToListViewMapping[$viewName];
        }

        return current($this->viewToListViewMapping);
    }
479435
public function generateViewFile($blockClassName)
    {
        sort($this->viewFileDoc);
        return $this->view->render('@cms/views/commands/block/create_block_view.php', [
            'blockClassName' => $blockClassName,
            'phpdoc' => $this->viewFileDoc,
            'luyaText' => $this->getGeneratorText('block/create'),
        ]);
    }
846044
public function render()
	{
		$path = $this->template;
		if (array_key_exists($path, ViewModel::$availableTemplates)) {
			$path = 'src/' . ViewModel::$availableTemplates[$this->template];
		}
		if (file_exists($path)) {
			ob_start();
			include($path);
			$output = ob_get_contents();
			ob_end_clean();
			return $output;
		} else {
			throw new \Exception("The requested template (" . $path . ") not found!");
		}
	}
361972
public function showAction($filename)
    {
        $message = $this->get('cocorico.swift_reader.message_manager')
            ->getOneByFileName($filename);

        return $this->render(
            'CocoricoSwiftReaderBundle:Message:_show.html.twig',
            array(
                'filename' => $filename,
                'message' => $message
            )
        );
    }
1341803
public function setCompileFile($filename)
    {
        $filename = (($this->compileFileNameMd5) ? md5(md5($filename)) : $filename);
        $this->templateCompileFile = $this->compilePath . $filename . $this->compileFileSuffix;
    }
749056
public function render($view)
    {
        if (method_exists($this, 'beforeRender')) {
            $this->beforeRender();
        }

        if (method_exists($this, 'getContext')) {
            $contextClass = $this->getContext();
            $context = new $contextClass($view, $this->data);
            $template = $this->path() . DS . 'out.mustache';
        } else {
            $template = $this->path() . DS . 'out.ctp';
        }

        if (!file_exists($template)) {
            user_error(__d('wasabi_cms', 'Template "{0}" for module {1} not found.', $template, $this->name()));
        }

        if (isset($context)) {
            if (!$this->_mustache) {
                $this->_mustache = new \Mustache_Engine();
            }
            $output = $this->_mustache->render(file_get_contents($template), $context);
        } else {
            $output = $view->element('Wasabi/Cms.module', [
                'template' => $template,
                'data' => $this->data
            ]);
        }

        return $output;
    }
859876
public function renderTemplate($filename, $data, $return = false)
    {
        $templateOutput = $this->parseTemplate($filename, $data);

        if ($return)
        {
            return $templateOutput;
        }

        echo $templateOutput;
        return $return;
    }
197783
public function getConfigByFilename(string $filename)
    {
        if (!isset($this->config[$filename])) {
            throw new Exception(
                'The file '.$filename.' has not been found',
                $this::ERR_FILE_NOT_FOUND
            );
        }
        
        return $this->config[$filename];
    }
1272830
public function render(string $view, array $templateVars = []): string
    {
        return $this->renderer->render($view, $templateVars);
    }
1158804
public function loadFile($filename) {
		$this->filename = $filename;


		// If a cache directory was specified,
        // try to load from it
		if ($this->cachePath) {
		    if (! $this->templatesRoot) {
		        $this->templatesRoot = dirname($filename);
            }
		    $cacheFile = $this->makeCacheFilename($this->cachePath, $this->templatesRoot, $this->filename);
            if ( file_exists($cacheFile)
                 && (! file_exists($this->filename) || (filemtime($this->filename) < filemtime($cacheFile)) )
            ) {
                $this->loadFromSerialized(file_get_contents($cacheFile));
                return;
            }
        }

		if(file_exists($filename)) {
			$this->source = file_get_contents($filename);
		} else {
			$message = "File not found: $filename";
			throw new FileNotFoundException($message, $filename);
		}
	}
282109
protected function _render($view)
    {
        // get Smarty is important here as it sets template directory correct
        $smarty = \OxidEsales\Eshop\Core\Registry::getUtilsView()->getSmarty();

        // render it
        $templateName = $view->render();

        // check if template dir exists
        $templateFile = \OxidEsales\Eshop\Core\Registry::getConfig()->getTemplatePath($templateName, $this->isAdmin());
        if (!file_exists($templateFile)) {
            $ex = oxNew(\OxidEsales\Eshop\Core\Exception\SystemComponentException::class);
            $ex->setMessage('EXCEPTION_SYSTEMCOMPONENT_TEMPLATENOTFOUND' . ' ' . $templateName);
            $ex->setComponent($templateName);

            $templateName = "message/exception.tpl";

            if ($this->_isDebugMode()) {
                \OxidEsales\Eshop\Core\Registry::getUtilsView()->addErrorToDisplay($ex);
            }
            \OxidEsales\Eshop\Core\Registry::getLogger()->error($ex->getMessage(), [$ex]);
        }

        // Output processing. This is useful for modules. As sometimes you may want to process output manually.
        $outputManager = $this->_getOutputManager();
        $viewData = $outputManager->processViewArray($view->getViewData(), $view->getClassName());
        $view->setViewData($viewData);

        //add all exceptions to display
        $errors = $this->_getErrors($view->getClassName());
        if (is_array($errors) && count($errors)) {
            \OxidEsales\Eshop\Core\Registry::getUtilsView()->passAllErrorsToView($viewData, $errors);
        }

        foreach (array_keys($viewData) as $viewName) {
            $smarty->assign($viewName, $viewData[$viewName]);
        }

        // passing current view object to smarty
        $smarty->oxobject = $view;

        $output = $this->fetchSmartyOutput($smarty, $templateName, $view->getViewId());

        //Output processing - useful for modules as sometimes you may want to process output manually.
        $output = $outputManager->process($output, $view->getClassName());

        return $outputManager->addVersionTags($output);
    }
815255
def render(filename, context=binding)
      contents=File.read(expand_filename(filename))
      template(contents, context)
    end
1310415
public function render()
    {
        $file = $this->translate($this->template);

        if (!is_file($file)) {
            throw new ViewException(sprintf('Unable to load template file "%s" (%s)', $this->template, $file));
        }

        ob_start();
        extract($this->storage);
        require $file;

        return ob_get_clean();
    }
270384
public function renderTemplate($name)
    {
        $data = array_merge($this->view_data, $this->view);
        $template = $this->getRealPath('template' . DSC . $name);
        $this->loadView($template, $data);
    }
143731
public function render($viewName, $asString=false) {
		$templateEngine=Startup::$templateEngine;
		$ext=\pathinfo($viewName, PATHINFO_EXTENSION);
		if ($ext === null)
			$viewName=$viewName . ".php";
		$data=$this->vars;
		if (!UString::endswith($viewName, ".php") && $templateEngine instanceof TemplateEngine) {
			return $templateEngine->render($viewName, $data, $asString);
		}

		if (is_array($data)) {
			extract($data);
		}
		$fileName=\ROOT . \DS . "views".\DS . $viewName;
		if(file_exists($fileName)){
			if ($asString) {
				return $this->includeFileAsString($fileName);
			} else {
				include ($fileName);
			}
		}else{
			throw new \Exception("View {$viewName} not found!");
		}
	}
143542
public static function make($filename, $params = array(), $direct_output = true){
        $view = new View($filename, $params);
        return $view->render($direct_output);
    }