Making afterViewFile callbacks able to modify the rendered content

CacheHelper will need this.
This commit is contained in:
mark_story 2011-10-08 21:47:08 -04:00
parent dcf8c0fd04
commit a8f0eb2b49

View file

@ -764,7 +764,11 @@ class View extends Object {
$this->Helpers->trigger('beforeRenderFile', array($viewFile));
$content = $this->_evaluate($viewFile, $data);
$this->Helpers->trigger('afterRenderFile', array($viewFile));
$content = $this->Helpers->trigger(
'afterRenderFile',
array($viewFile, $content),
array('modParams' => 1)
);
if (isset($this->_parents[$viewFile])) {
$this->_stack[] = $this->fetch('content');