mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Adding 'action' into View::__get() to make an integration test pass.
This commit is contained in:
parent
a521291afd
commit
634cea24eb
1 changed files with 5 additions and 1 deletions
|
@ -276,7 +276,7 @@ class View extends Object {
|
||||||
* @access protected
|
* @access protected
|
||||||
*/
|
*/
|
||||||
private $__passedVars = array(
|
private $__passedVars = array(
|
||||||
'viewVars', 'action', 'autoLayout', 'autoRender', 'ext', 'base', 'webroot',
|
'viewVars', 'autoLayout', 'autoRender', 'ext', 'base', 'webroot',
|
||||||
'helpers', 'here', 'layout', 'name', 'layoutPath', 'viewPath',
|
'helpers', 'here', 'layout', 'name', 'layoutPath', 'viewPath',
|
||||||
'params', 'request', 'data', 'plugin', 'passedArgs', 'cacheAction'
|
'params', 'request', 'data', 'plugin', 'passedArgs', 'cacheAction'
|
||||||
);
|
);
|
||||||
|
@ -653,6 +653,10 @@ class View extends Object {
|
||||||
if (isset($this->Helpers->{$name})) {
|
if (isset($this->Helpers->{$name})) {
|
||||||
return $this->Helpers->{$name};
|
return $this->Helpers->{$name};
|
||||||
}
|
}
|
||||||
|
switch ($name) {
|
||||||
|
case 'action':
|
||||||
|
return $this->request->params['action'];
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue