Is there anyway to disable the use of "php" tags inside volt? I would like users to edit volt files, but to prevent them for injecting custom code into the file.. How would I achive this?
$di->set('view', function () {
$view = new View();
$view->setViewsDir('../../themes/default/production/v1.0.0/');
$view->registerEngines([
'.volt' => function ($view) {
$volt = new VoltEngine($view, $this);
$volt->setOptions([
'compiledPath' => '../../themes/default/production/v1.0.0/cache/',
'compiledSeparator' => '_',
'compileAlways' => true
]);
$compiler = $volt->getCompiler();
$compiler->addExtension(
new PhpFunctionExtension()
);
return $volt;
}
]);
return $view;
}, true);