mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Moving Component::beforeRender triggering to allow components to modify
the view class to use for the render() call. Fixes #917 Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
parent
0e184c66f4
commit
32ea6d24cf
1 changed files with 1 additions and 2 deletions
|
@ -865,6 +865,7 @@ class Controller extends Object {
|
|||
*/
|
||||
function render($action = null, $layout = null, $file = null) {
|
||||
$this->beforeRender();
|
||||
$this->Component->triggerCallback('beforeRender', $this);
|
||||
|
||||
$viewClass = $this->view;
|
||||
if ($this->view != 'View') {
|
||||
|
@ -873,8 +874,6 @@ class Controller extends Object {
|
|||
App::import('View', $this->view);
|
||||
}
|
||||
|
||||
$this->Component->triggerCallback('beforeRender', $this);
|
||||
|
||||
$this->params['models'] = $this->modelNames;
|
||||
|
||||
if (Configure::read() > 2) {
|
||||
|
|
Loading…
Add table
Reference in a new issue