1 | <?php |
||
25 | class SetUpForm extends Model |
||
26 | { |
||
27 | public $name; |
||
28 | public $nickname = ''; |
||
29 | public $gravatar_type = 0; |
||
30 | public $gravatar = ''; |
||
31 | public $timezone; |
||
32 | public $description = ''; |
||
33 | /** |
||
34 | * @var Organization |
||
35 | */ |
||
36 | private $_parent; |
||
37 | /** |
||
38 | * @var User |
||
39 | */ |
||
40 | private $_user; |
||
41 | |||
42 | /** |
||
43 | * Finds user. |
||
44 | * |
||
45 | * @return User|null |
||
46 | * @throws InvalidConfigException |
||
47 | */ |
||
48 | public function getUser() |
||
55 | |||
56 | /** |
||
57 | * Set user. |
||
58 | * @param User $user |
||
59 | * @return boolean |
||
60 | */ |
||
61 | public function setUser($user) |
||
70 | |||
71 | /** |
||
72 | * Get parent organization or department. |
||
73 | * @return Organization |
||
74 | */ |
||
75 | public function getParent() |
||
82 | |||
83 | /** |
||
84 | * Set parent organization or department. |
||
85 | * If you want to set up organization, please set it null. |
||
86 | * @param Organization|string|integer $parent |
||
87 | * @return boolean |
||
88 | */ |
||
89 | public function setParent($parent) |
||
102 | |||
103 | /** |
||
104 | * @inheritdoc |
||
105 | */ |
||
106 | public function attributeLabels() |
||
117 | |||
118 | /** |
||
119 | * @inheritdoc |
||
120 | */ |
||
121 | public function rules() |
||
133 | |||
134 | /** |
||
135 | * Set up organization. |
||
136 | * You need to make sure that the user who want to set up the organization |
||
137 | * who has the `orgCreator` permission. |
||
138 | * @return boolean |
||
139 | */ |
||
140 | public function setUpOrganization() |
||
144 | |||
145 | /** |
||
146 | * Set up department. |
||
147 | * You need to make sure that the user who want to set up the department who |
||
148 | * is the creator or administrator of parent one. |
||
149 | * @return boolean |
||
150 | */ |
||
151 | public function setUpDepartment() |
||
155 | |||
156 | /** |
||
157 | * |
||
158 | */ |
||
159 | public function init() |
||
165 | } |
||
166 |