Render badge by given template.
@param string $template string to render
@return string
11283
public function renderBadge($template)
    {
        $tpl = $this->getTwig()->createTemplate($template);

        return $tpl->render(['app' => Yii::$app]);
    }
635766
protected function recursiveRender($template)
    {
        $output = '';
        foreach ($template as $val) {
            if (is_array($val)) {
                $output .= $this->recursiveRender($val);
            } else {
                $output .= $val;
            }
        }

        return $output;
    }
999031
protected function getZonesByTemplate($template)
    {
        $zones = $this->templates[$template]['zones'];

        foreach ($zones as $key => $zone) {
            $temp = array_map([$this, 'jsString'], $zone['restricted_types']);
            $zones[$key]['restricted_types'] = '['.implode(',', $temp).']';

            $zones[$key]['restricted_types'] = json_encode($zone['restricted_types']);
        }

        return $zones;
    }
970119
protected function render(string $template, array $parameters): string
    {
        $twig = new Environment(
            new FilesystemLoader([$this->skeletonDir]),
            [
                'debug' => true,
                'cache' => false,
                'strict_variables' => true,
                'autoescape' => false,
            ]
        );

        return $twig->render($template, $parameters);
    }
1100559
public static function renderTemplate($template, $replacements){
		foreach ($replacements as $find => $replace) {
			$template = \str_replace($find, $replace, $template);
		}
		return $template;
	}
292375
public function render($template = null)
  {
    return $this->getEngine()->render($template ?: $this->getTemplate(), array('layout' => $this));
  }
570400
static function render($template, $v = [])
    {
        if ($engine = self::getEngine($template)){
            return $engine->render($template, $v);
        }else{
            throw new Error(array('Template engine for template "%s" not found ', $template));
        }
    }
108398
private function buildParts($template)
    {
        $camelName = Str::camel($this->name);
        $tableName = strtolower($camelName);
        $template  = str_replace([
            '$TABLENAME$',
            '$CLASS$',
            '$FIELDS$'
        ], [
            $tableName,
            $this->className,
            $this->buildFields()
        ], $template);

        return $template;
    }
486427
public function renderPage(string $template, array $data = []): string
    {
        $this->thisShouldMakeItUniqueCodeCollabTemplateHtmlVariables = $data;

        /** @noinspection PhpUnusedLocalVariableInspection */
        $content = $this->render($template, $data);

        try {
            ob_start();

            /** @noinspection PhpIncludeInspection */
            require $this->thisShouldMakeItUniqueCodeCollabTemplateHtmlBasePage;
        } finally {
            $output = ob_get_clean();
        }

        return $output;
    }
469033
protected function getTemplate($template)
    {
        $path = realpath(__DIR__.'/../templates/'.$template.'.txt');

        return $this->files->get($path);
    }
1129785
protected function _renderTemplate($template) {
		if ($section = $this->_findSection($template)) {
			list($before, $type, $tag_name, $content, $after) = $section;

			$rendered_before = $this->_renderTags($before);

			$rendered_content = '';
			$val = $this->_getVariable($tag_name);
			switch($type) {
				// inverted section
				case '^':
					if (empty($val)) {
						$rendered_content = $this->_renderTemplate($content);
					}
					break;

				// regular section
				case '#':
					// higher order sections
					if ($this->_varIsCallable($val)) {
						$rendered_content = $this->_renderTemplate(call_user_func($val, $content));
					} else if ($this->_varIsIterable($val)) {
						foreach ($val as $local_context) {
							$this->_pushContext($local_context);
							$rendered_content .= $this->_renderTemplate($content);
							$this->_popContext();
						}
					} else if ($val) {
						if (is_array($val) || is_object($val)) {
							$this->_pushContext($val);
							$rendered_content = $this->_renderTemplate($content);
							$this->_popContext();
						} else {
							$rendered_content = $this->_renderTemplate($content);
						}
					}
					break;
			}

			return $rendered_before . $rendered_content . $this->_renderTemplate($after);
		}

		return $this->_renderTags($template);
	}
363707
protected function compileTemplate($template)
	{
		$template = $this->normalizer->normalizeTemplate($template);

		// Parse the template
		$ir = TemplateParser::parse($template);

		// Serialize the representation to PHP
		$php = $this->serializer->serialize($ir->documentElement);
		if (isset($this->optimizer))
		{
			$php = $this->optimizer->optimize($php);
		}

		return $php;
	}
242483
public function render($template)
    {
        $this->setTemplate($template);
        extract($this->data);
        ob_start();
        require $this->templatePath;

        return ob_get_clean();
    }
311694
public function display($template) {
		echo \Skeleton\Core\Util::rewrite_reverse_html($this->template->render($template));
	}
299995
public function compile($template)
    {
        $file = $this->getResolver()->resolve($template);
        $css = $this->getCompiler()->compile($file);
        return "<style>$css</style>";
    }
422276
protected function render($template, $context = [])
    {
        $context = array_merge($this->_context, $context);
        $body = $this->twig->render($template, $context);
        return $body;
    }
826169
public function render_request($template)
    {
        $this->modelReplacements[':app_namespace'] = $this->getAppNamespace();
        $this->modelReplacements[':request_name'] = $this->command->request_name($this->identifier);
        $this->modelReplacements[':model_name'] = $this->command->model_name($this->identifier);

        $template = strtr($template, $this->modelReplacements);

        return $template;
    }