Browse files

Making afterViewFile callbacks able to modify the rendered content

CacheHelper will need this.
  • Loading branch information...
1 parent dcf8c0f commit a8f0eb2b49f56796af6751e0d0f946c89ef4ff54 @markstory markstory committed Oct 8, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/View/View.php
View
6 lib/Cake/View/View.php
@@ -764,7 +764,11 @@ protected function _render($viewFile, $data = array()) {
$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');

0 comments on commit a8f0eb2

Please sign in to comment.