Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Making afterViewFile callbacks able to modify the rendered content

CacheHelper will need this.
  • Loading branch information...
commit a8f0eb2b49f56796af6751e0d0f946c89ef4ff54 1 parent dcf8c0f
Mark Story markstory authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Cake/View/View.php
6 lib/Cake/View/View.php
View
@@ -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');
Please sign in to comment.
Something went wrong with that request. Please try again.