1 | <?php |
||
28 | class UserTypeQuery extends CacheableActiveQuery |
||
29 | { |
||
30 | use OrganizationAttributeTrait, |
||
31 | UserAttributeTrait, |
||
32 | AuditAttributesTrait; |
||
33 | |||
34 | /** |
||
35 | * @inheritdoc |
||
36 | */ |
||
37 | public $orderBy = ['name' => SORT_ASC]; |
||
38 | |||
39 | /** |
||
40 | * @var int|int[]|null |
||
41 | */ |
||
42 | public $id; |
||
43 | |||
44 | /** |
||
45 | * @var string|string[]|null |
||
46 | */ |
||
47 | public $handle; |
||
48 | |||
49 | /** |
||
50 | * @var string|string[]|null |
||
51 | */ |
||
52 | public $name; |
||
53 | |||
54 | /** |
||
55 | * @param $id |
||
56 | * @return static |
||
57 | */ |
||
58 | public function id($id) |
||
63 | |||
64 | /** |
||
65 | * @param $id |
||
66 | * @return static |
||
67 | */ |
||
68 | public function setId($id) |
||
72 | |||
73 | |||
74 | /** |
||
75 | * @param $handle |
||
76 | * @return static |
||
77 | */ |
||
78 | public function handle($handle) |
||
83 | |||
84 | /** |
||
85 | * @param $handle |
||
86 | * @return static |
||
87 | */ |
||
88 | public function setHandle($handle) |
||
92 | |||
93 | /** |
||
94 | * @param $name |
||
95 | * @return static |
||
96 | */ |
||
97 | public function name($name) |
||
102 | |||
103 | /** |
||
104 | * @param $name |
||
105 | * @return static |
||
106 | */ |
||
107 | public function setName($name) |
||
111 | |||
112 | /** |
||
113 | * Flag if the table is already joined (to prevent subsequent joins) |
||
114 | * |
||
115 | * @var bool |
||
116 | */ |
||
117 | private $typeAssociationTableJoined = false; |
||
118 | |||
119 | /** |
||
120 | * Flag if the table is already joined (to prevent subsequent joins) |
||
121 | * |
||
122 | * @var bool |
||
123 | */ |
||
124 | private $userAssociationTableJoined = false; |
||
125 | |||
126 | /** |
||
127 | * @inheritdoc |
||
128 | */ |
||
129 | public function init() |
||
142 | |||
143 | /** |
||
144 | * @inheritdoc |
||
145 | * @throws QueryAbortedException |
||
146 | */ |
||
147 | public function prepare($builder) |
||
155 | |||
156 | /** |
||
157 | * Prepares simple attributes |
||
158 | */ |
||
159 | protected function prepareAttributes() |
||
169 | |||
170 | /** |
||
171 | * Prepares relation params |
||
172 | * @throws QueryAbortedException |
||
173 | */ |
||
174 | protected function prepareRelationsParams() |
||
185 | |||
186 | |||
187 | /************************************************************ |
||
188 | * JOIN TABLES |
||
189 | ************************************************************/ |
||
190 | |||
191 | /** |
||
192 | * @return string |
||
193 | */ |
||
194 | protected function joinUserTypeAssociationsTable(): string |
||
209 | |||
210 | /** |
||
211 | * @return string |
||
212 | */ |
||
213 | protected function joinOrganizationUserAssociationTable(): string |
||
229 | |||
230 | |||
231 | /************************************************************ |
||
232 | * USER |
||
233 | ************************************************************/ |
||
234 | |||
235 | /** |
||
236 | * @param string $alias |
||
237 | * @throws QueryAbortedException |
||
238 | */ |
||
239 | protected function applyUserParam(string $alias) |
||
254 | |||
255 | |||
256 | /************************************************************ |
||
257 | * ORGANIZATION |
||
258 | ************************************************************/ |
||
259 | |||
260 | /** |
||
261 | * @param string $alias |
||
262 | * @throws QueryAbortedException |
||
263 | */ |
||
264 | protected function applyOrganizationParam(string $alias) |
||
279 | } |
||
280 |