1 | <?php |
||
35 | class OrganizationQuery extends ElementQuery |
||
36 | { |
||
37 | use UserAttributeTrait, |
||
38 | UserGroupAttributeTrait, |
||
39 | UserTypeAttributeTrait, |
||
40 | UserStateAttributeTrait, |
||
41 | OrganizationTypeAttributeTrait; |
||
42 | |||
43 | /** |
||
44 | * @var mixed When the resulting organizations must have joined. |
||
45 | */ |
||
46 | public $dateJoined; |
||
47 | |||
48 | /** |
||
49 | * @inheritdoc |
||
50 | */ |
||
51 | protected $defaultOrderBy = ['dateJoined' => SORT_DESC]; |
||
52 | |||
53 | /** |
||
54 | * @inheritdoc |
||
55 | * @throws QueryAbortedException |
||
56 | */ |
||
57 | protected function beforePrepare(): bool |
||
75 | |||
76 | /** |
||
77 | * Prepares simple attributes |
||
78 | * |
||
79 | * @var string $alias |
||
80 | */ |
||
81 | protected function prepareAttributes(string $alias) |
||
87 | |||
88 | /** |
||
89 | * @throws QueryAbortedException |
||
90 | */ |
||
91 | protected function prepareRelationsParams() |
||
107 | |||
108 | |||
109 | /************************************************************ |
||
110 | * JOIN TABLES |
||
111 | ************************************************************/ |
||
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | protected function joinOrganizationUserTable(): string |
||
137 | |||
138 | /** |
||
139 | * @return string |
||
140 | */ |
||
141 | protected function joinOrganizationTypeTable(): string |
||
152 | |||
153 | |||
154 | /************************************************************ |
||
155 | * USER |
||
156 | ************************************************************/ |
||
157 | |||
158 | /** |
||
159 | * @param string $alias |
||
160 | * |
||
161 | * @return void |
||
162 | * @throws QueryAbortedException |
||
163 | */ |
||
164 | protected function applyUserParam(string $alias) |
||
179 | |||
180 | |||
181 | /************************************************************ |
||
182 | * USER GROUP |
||
183 | ************************************************************/ |
||
184 | |||
185 | /** |
||
186 | * @param string $alias |
||
187 | * |
||
188 | * @return void |
||
189 | * @throws QueryAbortedException |
||
190 | */ |
||
191 | protected function applyUserGroupParam(string $alias) |
||
213 | |||
214 | |||
215 | /************************************************************ |
||
216 | * USER TYPE |
||
217 | ************************************************************/ |
||
218 | |||
219 | /** |
||
220 | * @param string $alias |
||
221 | * |
||
222 | * @return void |
||
223 | * @throws QueryAbortedException |
||
224 | */ |
||
225 | protected function applyUserTypeParam(string $alias) |
||
247 | |||
248 | |||
249 | /************************************************************ |
||
250 | * USER STATE |
||
251 | ************************************************************/ |
||
252 | |||
253 | /** |
||
254 | * @param string $alias |
||
255 | * |
||
256 | * @return void |
||
257 | * @throws QueryAbortedException |
||
258 | */ |
||
259 | protected function applyUserStateParam(string $alias) |
||
274 | |||
275 | |||
276 | /************************************************************ |
||
277 | * TYPE |
||
278 | ************************************************************/ |
||
279 | |||
280 | /** |
||
281 | * @return void |
||
282 | * @throws QueryAbortedException |
||
283 | */ |
||
284 | protected function applyTypeParam() |
||
302 | } |
||
303 |