mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-10 05:22:41 +00:00
Fixing test and implementing return values for events
This commit is contained in:
parent
078a2dfd72
commit
ffa12f4d47
7 changed files with 91 additions and 26 deletions
|
@ -117,10 +117,8 @@ class ComponentCollection extends ObjectCollection implements CakeEventListener
|
|||
*/
|
||||
public function implementedEvents() {
|
||||
return array(
|
||||
'Controller.startup' => array(
|
||||
array('callable' => 'trigger', 'priority' => 9),
|
||||
array('callable' => 'trigger')
|
||||
),
|
||||
'Controller.initialize' => array('callable' => 'trigger'),
|
||||
'Controller.startup' => array('callable' => 'trigger'),
|
||||
'Controller.beforeRender' => array('callable' => 'trigger'),
|
||||
'Controller.beforeRedirect' => array('callable' => 'trigger'),
|
||||
'Controller.shutdown' => array('callable' => 'trigger', 'priority' => 9),
|
||||
|
|
|
@ -591,7 +591,6 @@ class Controller extends Object implements CakeEventListener {
|
|||
return array(
|
||||
'Controller.startup' => 'beforeFilter',
|
||||
'Controller.beforeRender' => 'beforeRender',
|
||||
'Controller.beforeRedirect' => array('callable' => 'beforeRedirect', 'passParams' => true),
|
||||
'Controller.shutdown' => 'afterFilter'
|
||||
);
|
||||
}
|
||||
|
@ -643,6 +642,7 @@ class Controller extends Object implements CakeEventListener {
|
|||
* @return void
|
||||
*/
|
||||
public function startupProcess() {
|
||||
$this->getEventManager()->dispatch(new CakeEvent('Controller.initialize', $this));
|
||||
$this->getEventManager()->dispatch(new CakeEvent('Controller.startup', $this));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue