diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php index cac70cf58a..f1fcf5a98d 100644 --- a/src/Controller/AppController.php +++ b/src/Controller/AppController.php @@ -51,22 +51,4 @@ public function initialize() //$this->loadComponent('Security'); //$this->loadComponent('Csrf'); } - - /** - * Before render callback. - * - * @param \Cake\Event\Event $event The beforeRender event. - * @return \Cake\Http\Response|null|void - */ - public function beforeRender(Event $event) - { - // Note: These defaults are just to get started quickly with development - // and should not be used in production. - // You should instead set "_serialize" in each action as required. - if (!array_key_exists('_serialize', $this->viewVars) && - in_array($this->response->getType(), ['application/json', 'application/xml']) - ) { - $this->set('_serialize', true); - } - } }