mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Making afterViewFile callbacks able to modify the rendered content
CacheHelper will need this.
This commit is contained in:
parent
dcf8c0fd04
commit
a8f0eb2b49
1 changed files with 5 additions and 1 deletions
|
@ -764,7 +764,11 @@ class View extends Object {
|
||||||
|
|
||||||
$this->Helpers->trigger('beforeRenderFile', array($viewFile));
|
$this->Helpers->trigger('beforeRenderFile', array($viewFile));
|
||||||
$content = $this->_evaluate($viewFile, $data);
|
$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])) {
|
if (isset($this->_parents[$viewFile])) {
|
||||||
$this->_stack[] = $this->fetch('content');
|
$this->_stack[] = $this->fetch('content');
|
||||||
|
|
Loading…
Add table
Reference in a new issue