pictcode / app / Controller / AppController.php @ master
履歴 | 表示 | アノテート | ダウンロード (2.28 KB)
1 | 635eef61 | spyder1211 | <?php
|
---|---|---|---|
2 | /**
|
||
3 | * Application level Controller
|
||
4 | *
|
||
5 | * This file is application-wide controller file. You can put all
|
||
6 | * application-wide controller-related methods here.
|
||
7 | *
|
||
8 | * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
|
||
9 | * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||
10 | *
|
||
11 | * Licensed under The MIT License
|
||
12 | * For full copyright and license information, please see the LICENSE.txt
|
||
13 | * Redistributions of files must retain the above copyright notice.
|
||
14 | *
|
||
15 | * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
||
16 | * @link http://cakephp.org CakePHP(tm) Project
|
||
17 | * @package app.Controller
|
||
18 | * @since CakePHP(tm) v 0.2.9
|
||
19 | * @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||
20 | */
|
||
21 | |||
22 | App::uses('Controller', 'Controller'); |
||
23 | |||
24 | /**
|
||
25 | * Application Controller
|
||
26 | *
|
||
27 | * Add your application-wide methods in the class below, your controllers
|
||
28 | * will inherit them.
|
||
29 | *
|
||
30 | * @package app.Controller
|
||
31 | * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller
|
||
32 | */
|
||
33 | class AppController extends Controller { |
||
34 | 3bf0e002 | admin | public $helpers = array( |
35 | 'Session',
|
||
36 | 'Html' => array('className' => 'BoostCake.BoostCakeHtml'), |
||
37 | 'Form' => array('className' => 'BoostCake.BoostCakeForm'), |
||
38 | 'Paginator' => array('className' => 'BoostCake.BoostCakePaginator'), |
||
39 | ); |
||
40 | |||
41 | public $components = array( |
||
42 | 'DebugKit.Toolbar',
|
||
43 | 33ddd711 | admin | 'Session',
|
44 | 5ec4ad9d | admin | 'Flash',
|
45 | 3bf0e002 | admin | 'Auth' => array( |
46 | 5ec4ad9d | admin | 'loginRedirect' => array( |
47 | 'controller' => 'users', |
||
48 | b3a58ce1 | hasse | 'action' => 'login_top' |
49 | 5ec4ad9d | admin | ), |
50 | 'logoutRedirect' => array( |
||
51 | 'controller' => 'users', |
||
52 | 'action' => 'login', |
||
53 | ), |
||
54 | 'authenticate' => array( |
||
55 | 'Form' => array( |
||
56 | 'fields' => array( |
||
57 | 'username' => 'login_id', //Default is 'username' in the userModel |
||
58 | 'password' => 'password' //Default is 'password' in the userModel |
||
59 | ), |
||
60 | 304d523f | hasse | // 'status' => 0,
|
61 | 5ec4ad9d | admin | 'passwordHasher' => 'Blowfish' |
62 | ) |
||
63 | ), |
||
64 | 8fa10255 | hasse | // 'flash' => array(
|
65 | // 'element' => 'alert',
|
||
66 | // 'key' => 'auth',
|
||
67 | // 'params' => array(
|
||
68 | // 'plugin' => 'BoostCake',
|
||
69 | // 'class' => 'alert-error'
|
||
70 | // )
|
||
71 | // )
|
||
72 | 3bf0e002 | admin | ) |
73 | ); |
||
74 | 8fa10255 | hasse | public function beforeFilter() { |
75 | // $this->Auth->allow('index', 'view');
|
||
76 | } |
||
77 | |||
78 | 635eef61 | spyder1211 | } |