This commit is contained in:
2025-05-07 11:19:57 -07:00
parent 8ceb6c6f43
commit 0feb448308
4 changed files with 39 additions and 0 deletions

View File

@@ -85,6 +85,13 @@ class RadThemeEngine
};
}
public static function assetURL()
{
return function ($template, $context, $args, $source) {
return $args;
};
}
private static function getFromBuffer($func)
{
ob_start();

View File

@@ -600,6 +600,7 @@ class Site
"json-access" => \ofc\RadThemeEngine::jsonAccess(),
"flex" => \ofc\RadThemeEngine::processFlex(),
"nl2br" => \ofc\RadThemeEngine::nl2br(),
"assetURL" => \ofc\RadThemeEngine::assetURL(),
];
foreach ($helpers as $name => $callback) {
$this->hb->addHelper($name, $callback);