Just messing around with writing a simple custom view renderer but can’t seem to figure out what is incorrect.
Using:
public function renderFile($context,$sourceFile,$data,$return) {
$data['this'] = $context;
extract($data);
ob_start();
include($sourceFile);
$contents = ob_get_contents();
ob_end_clean();
if($return) {
return $contents;
} else {
echo $contents;
}
}
But get the error:
Property "EMyCustomViewRenderer.pageTitle" is not defined.
Any ideas?