Skip to content
PHP Ecosystem
Explore

BaseTemplate

API reference › HTML Helper › Base › BaseTemplate

abstract classUIAwesome\Html\Helper\Base\BaseTemplate
Sourcesrc/Base/BaseTemplate.php
1 subclass

Provides reusable token substitution for template strings.

MethodDescriptionDefined by
render() staticRenders a template string by substituting tokens with provided values.BaseTemplate
public static function render(string $template, mixed[] $tokenValues): string

Renders a template string by substituting tokens with provided values.

Converts literal \n sequences to line breaks and removes empty lines after substitution.

Parameters

ParameterTypeDescription
$templatestringTemplate string containing tokens to be replaced.
$tokenValuesmixed[]Associative array of token replacements.

Returns

string: Rendered template string with substituted values.