- Fixed ViewToken and BlockToken inline vars

This commit is contained in:
Dave Mc Nicoll committed 2020-11-27 11:32:01 -05:00
1 parent 082bdd4ad3
commit 82eca2e520
7 files changed
+37 -39

No files matched your search

+2 -1
View File
@@ -7,6 +7,7 @@ class ViewToken implements ControlStructure {
public string $token = "view";
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) {
return "<?php echo \$___class__template->picea->renderHtml($arguments, get_defined_vars(), \$this); ?>";
# The way this is ordered, if you provide a second arguments, being an array of variables, get_defined_vars() will not be pushed inside the view
return "<?php echo \$___class__template->picea->inlineHtml(\$this, $arguments, get_defined_vars()); ?>";
}
}