adding example apps, fixing powerup issues
[feisty_meow.git] / production / example_apps / shared_calendar / src / View / AjaxView.php
1 <?php
2 /**
3  * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4  * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
5  *
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.
9  *
10  * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11  * @link          http://cakephp.org CakePHP(tm) Project
12  * @since         3.0.4
13  * @license       http://www.opensource.org/licenses/mit-license.php MIT License
14  */
15 namespace App\View;
16
17 use Cake\Event\EventManager;
18 use Cake\Network\Request;
19 use Cake\Network\Response;
20
21 /**
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.
25  */
26 class AjaxView extends AppView
27 {
28
29     /**
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
32      * the .ctp extension.
33      *
34      * @var string
35      */
36     public $layout = 'ajax';
37
38     /**
39      * Initialization hook method.
40      *
41      * @return void
42      */
43     public function initialize()
44     {
45         parent::initialize();
46
47         $this->response->type('ajax');
48     }
49 }