loadComponent('RequestHandler', [ 'enableBeforeRedirect' => false, ]); } /** * beforeFilter callback. * * @param \Cake\Event\Event $event Event. * @return \Cake\Http\Response|null|void */ public function beforeFilter(Event $event) { } /** * beforeRender callback. * * @param \Cake\Event\Event $event Event. * @return \Cake\Http\Response|null|void */ public function beforeRender(Event $event) { parent::beforeRender($event); $this->viewBuilder()->setTemplatePath('Error'); } /** * afterFilter callback. * * @param \Cake\Event\Event $event Event. * @return \Cake\Http\Response|null|void */ public function afterFilter(Event $event) { } }