Render the template

@param TemplateContext   $context A template context object
@return string  The output of the template
777373
protected function _actionRender(TemplateContext $context)
    {
        $source = parent::render($context->source, ObjectConfig::unbox($context->data));

        if($context->type && !in_array($context->type, $this->_excluded_types))
        {
            $source = $this->getObject('template.engine.factory')
                ->createEngine($context->type, array('functions' => $this->getFunctions()))
                ->render($source, $this->getData());
        }

        return $source;
    }
564986
def render(self, template, context_stack, delimiters=None):
        
        parsed_template = parse(template, delimiters)

        return parsed_template.render(self, context_stack)
345757
protected function _render()
    {
        try {
            $template = $this->_getTemplate();
            $context  = $this->_getContextFor($template);

            return $this->_renderTemplate($template, $context);
        } catch (RootException $e) {
            throw $this->_throwCouldNotRenderException($this->__('Could not render template'), null, $e);
        }
    }
1253367
public function render($context)
    {
        $column = $this->getRow()->getTable()->getParamAdapter()->getColumn();

        if (!$column && !$this->getDefaultColumn()) {
            return $context;
        } elseif (!$column && $this->getDefaultColumn()) {
            $column = $this->getDefaultColumn();
        }
        $actualRow = $this->getRow()->getActualRow();
        $valueOfColumn = $actualRow[$column];

        if ($this->getIsStarted()) {
            $this->setIsStarted(false);
            $this->setPreviousColumnValue($valueOfColumn);
            return $context;
        }

        if ($valueOfColumn !== $this->getPreviousColumnValue()
            && $this->getRow()->getTable()->getHeader($column)->getSeparatable()
        ) {
            $this->getRow()->addVarClass('separatable');
        }
        $this->setPreviousColumnValue($valueOfColumn);
    }
283370
protected function renderTwig($file, $context = [], $template = null)
    {
        $twig = $this->getTwigEnvironment();

        $template = $twig->loadTemplate($this->findTwigFile($file, $template));

        return $template->render($this->getTwigContext($context));
    }
1053968
public static function data_for_templates_manage_page($pagecontext) {
        global $PAGE;

        $params = self::validate_parameters(self::data_for_templates_manage_page_parameters(), array(
            'pagecontext' => $pagecontext
        ));
        $context = self::get_context_from_params($params['pagecontext']);
        self::validate_context($context);

        $renderable = new output\manage_templates_page($context);
        $renderer = $PAGE->get_renderer('tool_lp');

        $data = $renderable->export_for_template($renderer);

        return $data;
    }
1342202
def render(template, **context):
    '''
    
    '''
    theme = current_app.config['THEME']
    return render_theme_template(get_theme(theme), template, **context)
863080
def render_template(template_in, file_out, context):
    
    renderer = pystache.Renderer()
    result = renderer.render_path(template_in, context)
    with open(file_out, 'w') as handle:
        LOGGER.info('Rendering: {} to {}'.format(template_in, file_out))
        handle.write(result)
    shutil.copymode(template_in, file_out)
1205527
public function render($context = [])
    {
        if ($this->getElement()->hasAttribute('value')) {
            $this->getElement()->getAttributes()->remove('value');
        }
        return parent::render($context);
    }
517440
public function renderActions($context = 'bottom')
    {
        $returnValue = (string) '';

		if(isset($this->actions[$context])){

			$decorator = null;
			if(!is_null($this->getDecorator('actions-'.$context))){
			 	$decorator = $this->getDecorator('actions-'.$context);
			}
			else if(!is_null($this->getDecorator('actions'))){
			 	$decorator = $this->getDecorator('actions');
			}

			if(!is_null($decorator)){
				$returnValue .= $decorator->preRender();
			}

			foreach($this->actions[$context] as $action){
				$returnValue .= $action->render();
			}

			if(!is_null($decorator)){
				$returnValue .= $decorator->postRender();
			}

		}



        return (string) $returnValue;
    }
779106
protected function render(Context $context)
    {
        $this->logger->debug('kernel.process.render: render Response');

        // resolve output format
        if($context->response->raw) {

            // template
            if($template = $context->logic->html) {

                // render template
                $vars = $context->response->content;
                $vars = is_array($vars) ? $vars : (array)$vars;
                $content = $this->templater->render($template, $vars);

                // set html response
                $context->response = new Response\Html($content, $context->response->code, $context->response->headers);
                $this->logger->debug('kernel.process.render: template "' . $template . '" compiled');
            }
            // json
            elseif($context->logic->render = 'json') {
                $context->response = new Response\Json($context->response->content, $context->response->code, $context->response->headers);
                $this->logger->debug('kernel.process.render: json response generated');
            }

            // remove auto-generated flag
            $context->response->raw = false;
        }
        // render template
        elseif($context->response instanceof Response\Template) {
            $context->response->content = $this->templater->render($context->response->template, $context->response->vars);
        }
        // render redirect
        elseif($context->response instanceof Response\Redirect and $context->response->uri[0] == '/') {
            $context->response->uri = $context->request->uri->make($context->response->uri);
        }

        return $context;
    }
414037
public function render($context = [])
    {
        $this->setAttribute('value', $this->getInstanceValue());
        $data = parent::render($context);
        if ($this->isMultiple()) {
            $this->updateInstance();
        }
        return $data;
    }
101373
protected function _actionRender(ViewContext $context)
    {
        $rows    = '';
        $columns = array();

        // Get the columns
        foreach($context->entity as $entity)
        {
            $data    = $entity->toArray();
            $columns = array_merge($columns + array_flip(array_keys($data)));
        }

        // Empty the column values
        foreach($columns as $key => $value) {
            $columns[$key] = '';
        }

        //Create the rows
        foreach($context->entity as $entity)
        {
            $data = $entity->toArray();
            $data = array_merge($columns, $data);

            $rows .= $this->_arrayToString(array_values($data)).$this->eol;
        }

        // Create the header
        $header = $this->_arrayToString(array_keys($columns)).$this->eol;

        return $header.$rows;
    }
373419
public function render($context)
    {
        if (count($this->class) > 0 && is_array($this->class)) {
            foreach ($this->class as $class) {
                $this->getCell()->addClass($class);
            }
        }
        return $context;
    }
1354493
public function render(array $context = [])
    {
        $this->context()->addContext($context);

        return $this->lazy()->render($this->context()->get());
    }
692351
public function renderBlock(Twig_Environment $env, $template, $block, $context)
    {
        $template = $env->loadTemplate($template);
        $context = $env->mergeGlobals($context);

        return $template->renderBlock($block, $context);
    }
1251642
protected function _beforeRender(ControllerContext $context)
    {
        $controller = $context->getSubject();

        // Add toolbars on authenticated requests only.
        if ($controller->getUser()->isAuthentic())
        {
            //Add the toolbars
            $toolbars = (array)ObjectConfig::unbox($this->getConfig()->toolbars);

            foreach ($toolbars as $key => $value)
            {
                if (is_numeric($key)) {
                    $this->addToolbar($value);
                } else {
                    $this->addToolbar($key, $value);
                }
            }
        }

        //Add the template filter and inject the toolbars
        if($controller->getView() instanceof ViewTemplatable) {
            $controller->getView()->getTemplate()->addFilter('toolbar', array('toolbars' => $this->getToolbars()));
        }
    }