Automatic import labels into the content of an edited template via a

callback: ${app}_bo::labels(). They are set as $content['labels']
This commit is contained in:
Ralf Becker 2009-05-14 17:45:00 +00:00
parent a94586bad4
commit 2a03d32d81

View File

@ -509,6 +509,13 @@ class editor
unserialize(substr($vals["A$r"],0,-5)) : $vals["A$r"];
}
}
// check if bo class of $app exists and has a labels method --> add labels to content to display them in the editor
if(class_exists($app.'_bo') && method_exists($app.'_bo','labels'))
{
$new_content['labels'] = ExecMethod($acm=$app.'.'.$app.'_bo.labels');
$new_content['cont']['labels'] =& $new_content['labels'];
//echo $acm; _debug_array($new_content['labels']);
}
$preserv['olds'] = $vals;
$preserv['old_keys'] = $this->etemplate->as_array(-1); // in case we do a save as