Render template.

@return string|null
167098
protected function renderTpl()
    {
        if (empty($this->tpl)) {
            return Json::encode($this->array);
        }
        $i = 1;
        $result = '';
        $countItems = count($this->array);
        $addPlaceholders = $this->template->findPlaceholders($this->addPlaceholders);
        $addPlaceholders['countItems'] = $countItems;
        $placeholders = [];

        foreach ($this->array as $placeholders) {
            if (is_array($placeholders)) {
                $placeholders['currentItem'] = $i;
                $this->prepareItem($placeholders);
                $result .= $this->template->replaceByPrefix(
                    $this->tpl,
                    array_merge($placeholders, $addPlaceholders)
                );
                ++$i;
                continue;
            }
            $result .= $this->template->replaceByPrefix(
                $this->tpl,
                array_merge($addPlaceholders, ['output' => $placeholders, 'currentItem' => $i]));

            ++$i;
        }

        // Deleting placeholders
        if (is_array($placeholders)) {
            $this->template->removeMultiPlaceholders(array_keys($placeholders));
        }
        // Inserting content into wrapper template (optional)
        if (!empty($this->wrapperTpl)) {
            $result = $this->renderWrapperTpl($result, $addPlaceholders);
        }
        // Concat pagination
        if (empty($this->pagination['toPlaceholder'])) {
            $result .= $this->template->getPlaceholder('pagination', false);
        }
        // Deleting placeholders
        $this->template->removePlaceholder('pagination');
        $this->template->removeMultiPlaceholders(array_keys($addPlaceholders));
        // To placeholder
        if (!empty($this->toPlaceholder)) {
            $this->template->addPlaceholder($this->toPlaceholder, $result, true);
            $this->template->cachePlaceholders[$this->toPlaceholder] = $result;
            return null;
        }

        return $result;
    }
1267502
public static function Render($template=null, $data=null)
    {
        if ($template && $data) {
            return self::$renderer->render($template, $data);
        } else {
            self::$data = self::getData();
            self::$templates[] = "index";
            self::loadTemplate(self::$templates);
        }
    }
484860
public function render()
    {
        if ($this->getView() === null) {
            $this->setView(new TemplateView('controls/column_sorting'));
        }
        $this->getView()->mergeData([
            'order' => $this->getDirection(),
            'links' => $this->makeLinks()
        ]);
        return parent::render();
    }
1198277
public function render()
    {
        $this->moveChildrenToMainSection();
        $this->getTemplate()
            ->mergeData($this->getData())
            ->mergeData(['layout' => $this]);
        return parent::render();
    }
544000
public function render()
    {
        parent::render();

        if ($sTpl = $this->getViewParameter("sWidgetType")) {
            $sTemplateName = 'widget/' . basename($sTpl) . '/categorylist.tpl';
            if (\OxidEsales\Eshop\Core\Registry::getConfig()->getTemplatePath($sTemplateName, $this->isAdmin())) {
                $this->_sThisTemplate = $sTemplateName;
            }
        }

        return $this->_sThisTemplate;
    }
98909
public function render()
    {
        $source = $this->getOption('templateSource');
        $templatePathAndFilename = $this->getOption('templatePathAndFilename');
        if ($templatePathAndFilename !== null) {
            $source = file_get_contents($templatePathAndFilename);
        }

        return preg_replace_callback('/\{([a-zA-Z0-9\-_.]+)\}/', function ($matches) {
            return ObjectAccess::getPropertyPath($this->variables, $matches[1]);
        }, $source);
    }
927927
public function render()
    {
        parent::render();

        // checking registration status
        if ($this->isEnabledPrivateSales() && $this->isConfirmed()) {
            $sTemplate = $this->_sConfirmTemplate;
        } elseif ($this->getRegistrationStatus()) {
            $sTemplate = $this->_sSuccessTemplate;
        } else {
            $sTemplate = $this->_sThisTemplate;
        }

        return $sTemplate;
    }
304435
public function render() {
		$html = $this->renderToHtml();

		if (!empty($this->extendedTemplate)) {
			$data = [$this->extendedParamName => $html] + $this->extendedData + $this->data;
			$html = $this->templateService->render($this->extendedTemplate, $data);
		}

		return $html;
	}
147061
public function parse_template()
    {
        $self = $this;
        return preg_replace_callback('/\{\{([a-zA-Z\d-_]+)\}\}/', function($a) use($self) {
            $component = $self->get_component($a[1]);
            return $component->render();
        }, $this->model['template']);
    }
1025076
public function renderTemplates()
    {
        $html = '';

        if ($this->getOption('debug')) {
            $html .= "\n\n<!-- Start Asset Template -->\n\n";
        }

        foreach ($this->templates as $name => $template) {
            if ($this->getOption('debug')) {
                $html .= sprintf("\n<!-- $name -->\n");
            }

            $html .= $template;
        }

        return $html;
    }
986361
public function RenderTemplate () {
		$formViewScript = $this->form->GetViewScript();
		return $this->Render(
			static::$formsDir,
			is_bool($formViewScript) ? $this->form->GetId() : $formViewScript
		);
	}
1255093
private function _renderTemplate($template = null)
    {
        // when no template, auto generate template path.
        // View/Content/[controller]/[action].html.twig
        $def = $this->actionChain->getCurrentAction();
        if (! $template) {
            $controller = join(DS, array_map('ucfirst', explode('_', $def['controller_name'])));
            $action = $def['action'];
            $template = sprintf('%s/%s.%s', $controller, substr($this->actionChain->actionNameStrategy($action), 0, -6), $this->renderer->getSuffix());
        }

        // rendering by renderer.
        $def['controller']->beforeRenderer();
        $result = $this->renderer->render($template);
        $this->response->setBody($result);
        if ($this->response->isHttp()) {
            $this->response->setHeader('content-type', sprintf('text/html; charset=%s', $this->application->config('encoding.output')));
        }
    }
278211
public function template() {

		if ( is_null( $this->template ) ) {
			$this->template = $this->locate();
		}

		return $this->template;
	}
591287
protected function _getTemplate()
    {
        if (is_null($this->_template)) {
            foreach ($this->_map as $method => $className) {
                if ($this->_sql instanceof $className) {
                    $this->_template = $this->$method();
                    break;
                }
            }
        }
        return $this->_template;
    }
221803
public function render($templateName = null, $data = [])
    {
        $this->setTemplate($templateName, $data);

        if (empty($this->_templateName)) {
            if (defined('FOCUS_DEBUG') && FOCUS_DEBUG) {
                $this->getLogger()->debug('template name is null');
            }

            throw new \RuntimeException('TEMPLATE_IS_NULL');
        }
        $buffer = $this->_parseTemplate($this->_templateName, $this->_data);
        if (!empty($this->_layout)) {
            if (defined('FOCUS_DEBUG') && FOCUS_DEBUG) {
                $this->getLogger()->debug('loading layout: '.$this->_layout);
            }

            $buffer = $this->_parseTemplate(
                $this->_layout,
                array_merge($this->_data, ['__body__' => $buffer])
            );
        }

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

        return ob_get_clean();
    }
892692
protected function template()
    {
        $template = $this->template ?: $this->config->get('datatables-html.script', 'datatables::script');

        return $this->view->make($template, ['editors' => $this->editors])->render();
    }