Rendering decorator
@param string $context
@return string
777293
public function render($context)
    {
        return (isset($this->options[$context])) ? $this->options[$context] :    $context;
    }
807733
public static function helpers($context) {
        $ret = '';
        foreach ($context['helpers'] as $name => $func) {
            if (!isset($context['usedCount']['helpers'][$name])) {
                continue;
            }
            if ((is_object($func) && ($func instanceof \Closure)) || ($context['flags']['exhlp'] == 0)) {
                $ret .= ("            '$name' => " . static::closure($context, $func) . ",\n");
                continue;
            }
            $ret .= "            '$name' => '$func',\n";
        }

        return "array($ret)";
    }
893819
public static function renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext): string {
    $input     = $arguments['input'];
    $separator = $arguments['separator'];
    $output    = '';

    if ($input) {
      $output = self::createSlug($input, $separator);
    }

    return $output;
  }
1328567
public function evaluateTwigFunc($context, $twig ) {

        $loader = new \Twig_Loader_Filesystem('.');
        $env = new \Twig_Environment($loader);

        $template = $env->createTemplate($twig);

        return $template->render($context);
    }
939487
public function render($object, string $context = null): void
    {
        if ($this->noDirectory) {
            throw new NoTemplateFoundException("Cannot render object of class ".get_class($object). '. Directory ' .$this->directory.' does not exists.');
        }
        $fileName = $this->getTemplateFileName($object, $context);

        if ($fileName != false) {
            if (method_exists($object, 'getPrivateProperties')) {
                $array = $object->getPrivateProperties();
            } else {
                $array = get_object_vars($object);
            }
            if ($fileName['type'] == 'twig') {
                if (!isset($array['this'])) {
                    $array['this'] = $object;
                }
                echo $this->twig->render($fileName['fileName'], $array);
            } else {
                // Let's store the filename into the object ($this) in order to avoid name conflict between
                // the variables.
                $this->tmpFileName = $fileName;

                extract($array);
                // Let's create a local variable
                /*foreach ($array as $var__tplt=>$value__tplt) {
                    $$var__tplt = $value__tplt;
                }*/
                include $this->directory.'/'.$this->tmpFileName['fileName'];
            }
        } else {
            throw new NoTemplateFoundException("Cannot render object of class ".get_class($object).". No template found.");
        }
    }
1001906
def render_template(template, **context):
    
    parts = template.split('/')
    renderer = _get_renderer(parts[:-1])
    return renderer.render(renderer.load_template(parts[-1:][0]), context)
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;
    }
651689
public function proceed(Context $context)
    {
        $context = $this->route($context);
        $context = $this->resolve($context);
        $context = $this->guard($context);
        $context = $this->execute($context);
        $context = $this->render($context);

        return $context;
    }
16860
public function render($template, $context = array(), Response $response = null)
    {
        if ($response === null) {
            $response = new Response();
        }

        $response->setContent($this['mustache']->render($template, $context));

        return $response;
    }
277724
public function getEscaper($context)
    {
        if (!isset($this->escapers[$context])) {
            throw new \InvalidArgumentException(sprintf('No registered escaper for context "%s".', $context));
        }

        return $this->escapers[$context];
    }
601076
public function render($context = array())
    {
        $this->set($context);

        $this->stream = new StreamWriter();
        $this->nodelist->render($this->context, $this->stream);

        return $this->stream->close();
    }
91823
public function fireEvents($context)
    {
        if (!isset($context['__env'])) {
            return $context;
        }

        /** @var \Illuminate\View\Factory $factory */
        $env  = $context['__env'];
        $viewName = $this->name ?: $this->getTemplateName();

        $view = new View(
            $env,
            $env->getEngineResolver()->resolve('twig'),
            $viewName,
            null,
            $context
        );
        $env->callCreator($view);
        $env->callComposer($view);
        return $view->getData();
    }
178042
public function renderUserElementMap(array &$context)
	{
		$map = $this->renderer->getElementMap($context['user']['id'], Craft::$app->getSites()->getPrimarySite()->id);
		return $this->renderMap($map);
	}
986120
public function render($context = [])
    {
        $element = clone $this->element;

        $value = $this->element->getAttribute('value', false);
        if ($value !== false) {
            $this->element->getAttributes()->remove('value');
        }
        $html = parent::render($context);
        $this->element = $element;
        return $html;
    }
749116
protected function _render($context = null)
    {
        if (is_null($context)) {
            $context = [];
        }

        return $this->_replaceTokens($this->_getPlaceholderTemplate(), $context, $this->_getTokenStart(), $this->_getTokenEnd(), $this->_getDefaultPlaceholderValue());
    }
1181530
public function render($context)
    {
        $cell = $this->getCell();
        $cell->addClass('editable');
        $cell->addAttr('data-column', $cell->getHeader()->getName());
        return $context;
    }
1185160
protected function _actionRender(KViewContext $context)
    {
        if(empty($this->module->content))
        {
            $format = $this->getFormat(); //format cannot be changed through context
            $layout = $context->layout;

            if (is_string($layout) && strpos($layout, '.') === false)
            {
                $identifier = $this->getIdentifier()->toArray();
                $identifier['name'] = $layout;

                $layout = (string) $this->getIdentifier($identifier);
            }

            //Unpack the data (first level only)
            $data = array();
            foreach($context->data as $key => $value) {
                $data[$key] = $value;
            }

            $this->_content = $this->getTemplate()
                ->loadFile($layout.'.'.$format)
                ->setParameters($context->parameters)
                ->render($data);
        }
        else
        {
            $this->_content = $this->getTemplate()
                ->loadString($this->module->content)
                ->setParameters($context->parameters)
                ->filter();
        }

        return $this->_content;
    }