3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
6 * Licensed under The MIT License
7 * For full copyright and license information, please see the LICENSE.txt
8 * Redistributions of files must retain the above copyright notice.
10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11 * @link http://cakephp.org CakePHP(tm) Project
13 * @license http://www.opensource.org/licenses/mit-license.php MIT License
17 use Cake\Event\EventManager;
18 use Cake\Network\Request;
19 use Cake\Network\Response;
22 * A view class that is used for AJAX responses.
23 * Currently only switches the default layout and sets the response type -
24 * which just maps to text/html by default.
26 class AjaxView extends AppView
30 * The name of the layout file to render the view inside of. The name
31 * specified is the filename of the layout in /src/Template/Layout without
36 public $layout = 'ajax';
39 * Initialization hook method.
43 public function initialize()
47 $this->response->type('ajax');