Render the given template, and returns the result as a string.

@param string $templateName the complete template name, with extension
@param array  $args         the template arguments
@param string$templateDir

@return string
192593
protected function renderRaw($templateName, $args = array(), $templateDir = null)
    {
        // Add the template standard extension
        $templateName .= '.html';

        // Render the template.
        $data = $this->getParser($templateDir)->render($templateName, $args);

        return $data;
    }
218165
public function javascriptTemplateRender($templateName, $viewData) {
    /** @var $templateEngine \Twig_Environment */
    $templateEngine = $this->getTemplateEnv();
    return $templateEngine->render($templateName, $viewData);
  }
1151771
private function renderTemplate($viewType, array $templateParams = [], $widget = false)
    {
        $template = $widget && !empty($this->configuration['view'][$viewType]['template'])
            ? $this->configuration['view'][$viewType]['template']
            : sprintf('DarvinAdminBundle:Crud%s:%s.html.twig', $widget ? '/widget' : '', $viewType);

        return $this->renderView($template, $templateParams);
    }
1249765
public function load_template($slug, $name = '', array $args = []){
        if( !did_action('template_redirect') ){
            do_action('template_redirect');
        }
        if( !$this->filtered ){
            add_filter('wp_title', [$this, 'wp_title'], 10, 3);
        }
        parent::load_template($slug, $name, $this->data, $args);
    }
898763
public function render($viewName, $pData, $asString) {
		$pData ["config"] = Startup::getConfig ();
		EventsManager::trigger ( ViewEvents::BEFORE_RENDER, $viewName, $pData );
		$render = $this->twig->render ( $viewName, $pData );
		EventsManager::trigger ( ViewEvents::AFTER_RENDER, $render, $viewName, $pData );
		if ($asString) {
			return $render;
		} else {
			echo $render;
		}
	}
937605
protected function renderZone($zone, $args=array()){
    $sep = isset($args['seperator']) ? $args['seperator'] : ' ';

		if($this->debug===true){
      echo "\n\n".'<!-- Template Zone: '.$zone.' -->';
    }

    $content = '';
    if(isset($this->content[$zone])){
      foreach($this->content[$zone] as $item){
        switch($item['type']){
          case 'hook':
            //method will be called with two arrays as arguments
            //the first is the args passed to this method (ie. in a template call to $this->insert() )
            //the second are the args passed when the hook was bound
            $content .= call_user_func_array($item['hook'], array($args, $item['arguments']));
            break;
          case 'html':
            $content .= $sep . (string) $item['html'];
            break;
          case 'template':
            $content .= $this->renderTemplate($item['template'], $item['params']);
            break;
          case 'zone':
            $content .= $this->renderZone($item['zone'], $item['params']);
            break;
        }

      }
    }
    //content from #movetoskin and #skintemplate
    if( \Skinny::hasContent($zone) ){
      foreach(\Skinny::getContent($zone) as $item){

        //pre-rendered html from #movetoskin
        if(isset($item['html'])){
          if($this->debug===true){
            $content.='<!--Skinny:MoveToSkin: '.$template.'-->';
          }
          $content .= $sep . $item['html'];
        }
        else
        //a template name to render
        if(isset($item['template'])){
          if($this->debug===true){
            $content.='<!--Skinny:Template (via #skintemplate): '.$item['template'].'-->';
          }
          $content .= $this->renderTemplate( $item['template'], $item['params'] );
        }
      }
    }
    return $content;
  }
994386
public function render($path, $templateName)
    {
        set_error_handler(array($this, 'error'));

        try {
            ob_start();
            include $path . $templateName;
            $content = ob_get_clean();
        } catch (EnvironnementNotDefinedException $e) {
            restore_error_handler();
            ob_end_clean();
            throw new ViewRendererException($e->getMessage());
        } catch (\Exception $ex) {
            restore_error_handler();
            ob_end_clean();
            throw new ViewRendererException(
                'In : "' . realpath($path . $templateName) . '" ' . $ex->getMessage() . ' Line ' . $ex->getLine()
            );
        }

        restore_error_handler();

        return $content;
    }
303523
private function getTemplateContent($templateName, $additionnalParameters = array())
    {
        $this->smarty->assign($additionnalParameters);
        return $this->module->fetch(__DIR__.'/../views/'.$templateName.'.tpl');
    }
927184
protected function render($template, $args = array())
    {
        if (!is_null($this->renderTemplateSuffix)
            && !preg_match('/\.' . $this->renderTemplateSuffix . '$/', $template)
        ) {
            $template .= '.' . $this->renderTemplateSuffix;
        }
        $this->app->render($template, $args);
    }
20314
function renderTemplate(contents, data, filename) {
    if (!templateCache.hasOwnProperty(contents)) {
      var jadeOptions = merge.recursive({}, options.jadeOptions, {filename: filename});
      templateCache[contents] = options.jade.compile(contents, jadeOptions);
    }
    var locals = merge.recursive({}, data, {locals: locals});
    return templateCache[contents](data);
  }
1252701
public function render_module_template( string $name, array $args ) {
		if ( ! apply_filters( 'hogan/module/' . $name . '/show_in_rest', true ) && \hogan_is_rest() ) {
			return;
		}

		// Get the right module.
		$module = $this->get_module( $name );

		if ( $module instanceof Module ) {
			$module->render_template( $args, $this->_module_counter );
			$this->_module_counter++;
		}
	}
903198
public function render($templateName)
    {
        try {
            return $this->twigEnvironment->render($templateName, $this->getData());
        } catch (SecurityException $e) {
            throw new SecurityException($e->getMessage(), $e->getCode(), $e);
        } catch (\Twig_Error_Runtime $e) {
            throw new RuntimeException($e->getMessage(), $e->getCode(), $e);
        } catch (\Twig_Error_Syntax $e) {
            throw new InvalidSyntaxException($e->getMessage(), $e->getCode(), $e);
        } catch (\Twig_Error_Loader $e) {

            if ($this->ignoreUndefinedTemplateErrors && Str::contains($e->getMessage(), 'is not defined'))
            {
                return;
            }

            throw new InvalidTemplateException($e->getMessage(), $e->getCode(), $e);
        }
    }
287086
protected function _renderTemplate()
	{
		$replace = array();
		$with    = array();

		foreach ($this->_template_tags as $jdoc => $args)
		{
			$replace[] = $jdoc;
			$with[]    = $this->getBuffer($args['type'], $args['name'], $args['attribs']);
		}

		return str_replace($replace, $with, $this->_template);
	}
281293
protected function renderTemplate($templateName, array $variables = [])
    {
        $templatePath = __DIR__ . '/../../../stub/' . $templateName;
        if (!file_exists($templatePath)) {
            throw new DbExporterException('Template ' . $templateName . ' not found');
        }

        $template = file_get_contents($templatePath);

        $search  = array_keys($variables);
        $replace = array_values($variables);

        foreach ($search as &$item) {
            $item = '{{' . $item . '}}';
        }

        return str_replace($search, $replace, $template);
    }
898205
public static function get_template_filepath($name, $themename = '') {
        global $CFG, $PAGE;

        if (strpos($name, '/') === false) {
            throw new coding_exception('Templates names must be specified as "componentname/templatename"' .
                                       ' (' . s($name) . ' requested) ');
        }
        list($component, $templatename) = explode('/', $name, 2);
        $component = clean_param($component, PARAM_COMPONENT);
        if (strpos($templatename, '/') !== false) {
            throw new coding_exception('Templates cannot be placed in sub directories (' . s($name) . ' requested)');
        }

        $dirs = self::get_template_directories_for_component($component, $themename);

        foreach ($dirs as $dir) {
            $candidate = $dir . $templatename . '.mustache';
            if (file_exists($candidate)) {
                return $candidate;
            }
        }

        throw new moodle_exception('filenotfound', 'error', '', null, $name);
    }
384408
public static String renderStr(String template, Object... args) {
        return engine().renderString(template, args);
    }
503255
def render_string(template_string, context, format = default_format)
      render_file(proc_template(template_string), context, format)
    end