WIP
This commit is contained in:
@@ -92,6 +92,13 @@ class RadThemeEngine
|
||||
};
|
||||
}
|
||||
|
||||
public static function assetContents()
|
||||
{
|
||||
return function ($template, $context, $args, $source) {
|
||||
return site()->getAssetContents($args);
|
||||
};
|
||||
}
|
||||
|
||||
private static function getFromBuffer($func)
|
||||
{
|
||||
ob_start();
|
||||
|
||||
@@ -601,6 +601,7 @@ class Site
|
||||
"flex" => \ofc\RadThemeEngine::processFlex(),
|
||||
"nl2br" => \ofc\RadThemeEngine::nl2br(),
|
||||
"assetURL" => \ofc\RadThemeEngine::assetURL(),
|
||||
"assetContents" => \ofc\RadThemeEngine::assetContents(),
|
||||
];
|
||||
foreach ($helpers as $name => $callback) {
|
||||
$this->hb->addHelper($name, $callback);
|
||||
|
||||
Reference in New Issue
Block a user