-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathRegistrationsAppModel.php
More file actions
44 lines (39 loc) · 1.13 KB
/
RegistrationsAppModel.php
File metadata and controls
44 lines (39 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/**
* Registrations App Model
*
* @property Block $Block
*
* @author Noriko Arai <arai@nii.ac.jp>
* @author AllCreator <info@allcreator.net>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
App::uses('AppModel', 'Model');
/**
* Summary for RegistrationQuestion Model
*/
class RegistrationsAppModel extends AppModel {
/**
* use behaviors
*
* @var array
*/
public $actsAs = array(
);
/**
* Called during validation operations, before validation. Please note that custom
* validation rules can be defined in $validate.
*
* @param array $options Options passed from Model::save().
* @return bool True if validate operation should continue, false to abort
* @link http://book.cakephp.org/2.0/en/models/callback-methods.html#beforevalidate
* @see Model::save()
*/
public function beforeValidate($options = array()) {
// この継承クラスたちがValidateロジックを走らせる前に必ずDBを切り替える
$this->setDataSource('master');
return parent::beforeValidate($options);
}
}