PluginProbe
The Innovative Form Builder – IvyForms / 0.9.1
The Innovative Form Builder – IvyForms v0.9.1
1.5.1 1.5 1.4.1 1.4 trunk 0.1.2 0.2 0.2.1 0.3 0.3.1 0.4 0.5 0.6 0.6.1 0.6.1-backup 0.6.1.1 0.7 0.8 0.8.1 0.8.2 0.9 0.9.1 1.0 1.1 1.1.1 All 27 releases
ivyforms / backend / src / Services / Template / TechnicalInterviewFeedbackFormTemplate.php

TechnicalInterviewFeedbackFormTemplate.php in The Innovative Form Builder – IvyForms 0.9.1, at backend/src/Services/Template/TechnicalInterviewFeedbackFormTemplate.php

375 lines 13.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace IvyForms\Services\Template;
4
5 // phpcs:disable PSR1.Files.SideEffects
6 if (!defined('ABSPATH')) {
7 exit; // Exit if accessed directly
8 }
9
10 use IvyForms\Services\Translations\BackendStrings;
11
12 class TechnicalInterviewFeedbackFormTemplate
13 {
14 /**
15 * Get the Technical Interview Feedback Form template
16 *
17 * @return array<string, mixed>
18 */
19 public static function getTemplate(): array
20 {
21 return [
22 'id' => 'technical_interview_feedback_form',
23 'name' => BackendStrings::getTemplateStrings()['technical_interview_feedback_form'],
24 'description' => BackendStrings::getTemplateStrings()['technical_interview_feedback_form_desc'],
25 'category' => 'feedback-forms',
26 'subcategory' => 'interview-feedback-forms',
27 'is_pro' => false,
28 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'technical-interview-feedback-form.svg',
29 'form_data' => [
30 'name' => BackendStrings::getTemplateStrings()['technical_interview_feedback_form'],
31 'published' => 1,
32 'showTitle' => 1,
33 'storeEntries' => 1,
34 'integrationSettings' => TemplateDefaults::getDefaultIntegrationSettings(),
35 'fields' => array_merge(
36 self::getCandidateInformationFields(),
37 self::getInterviewOutcomeFields(),
38 self::getRatingFields(),
39 self::getKeyAreasFields(),
40 self::getRecommendationFields(),
41 self::getInterviewerInformationFields()
42 ),
43 'settings' => []
44 ]
45 ];
46 }
47
48 /**
49 * Get candidate information fields
50 *
51 * @return array<int, array<string, mixed>>
52 */
53 private static function getCandidateInformationFields(): array
54 {
55 return [
56 // Candidate Name or Reference (Text Field)
57 [
58 'id' => 1,
59 'fieldIndex' => 1,
60 'type' => 'text',
61 'label' => BackendStrings::getTemplateStrings()['candidate_name_or_id'],
62 'placeholder' => BackendStrings::getTemplateStrings()['enter_candidate_name_or_id'],
63 'required' => false,
64 'parentId' => null,
65 'defaultValue' => '',
66 'position' => 1,
67 ],
68 ];
69 }
70
71 /**
72 * Get interview outcome fields
73 *
74 * @return array<int, array<string, mixed>>
75 */
76 private static function getInterviewOutcomeFields(): array
77 {
78 return [
79 // Overall Interview Outcome
80 [
81 'id' => 7,
82 'fieldIndex' => 2,
83 'type' => 'radio',
84 'label' => BackendStrings::getTemplateStrings()['overall_interview_outcome'],
85 'required' => true,
86 'parentId' => null,
87 'defaultValue' => '',
88 'placeholder' => '',
89 'position' => 2,
90 'fieldOptions' => [
91 [
92 'id' => 2,
93 'label' => BackendStrings::getTemplateStrings()['very_positive'],
94 'value' => 'very_positive',
95 'isDefault' => false,
96 'position' => 1
97 ],
98 [
99 'id' => 3,
100 'label' => BackendStrings::getTemplateStrings()['mostly_positive'],
101 'value' => 'mostly_positive',
102 'isDefault' => false,
103 'position' => 2
104 ],
105 [
106 'id' => 4,
107 'label' => BackendStrings::getTemplateStrings()['neutral'],
108 'value' => 'neutral',
109 'isDefault' => false,
110 'position' => 3
111 ],
112 [
113 'id' => 5,
114 'label' => BackendStrings::getTemplateStrings()['mostly_negative'],
115 'value' => 'mostly_negative',
116 'isDefault' => false,
117 'position' => 4
118 ],
119 [
120 'id' => 6,
121 'label' => BackendStrings::getTemplateStrings()['very_negative'],
122 'value' => 'very_negative',
123 'isDefault' => false,
124 'position' => 5
125 ],
126 ],
127 ],
128 ];
129 }
130
131 /**
132 * Get rating fields
133 *
134 * @return array<int, array<string, mixed>>
135 */
136 private static function getRatingFields(): array
137 {
138 return [
139 // Overall Candidate Fit Rating
140 [
141 'id' => 13,
142 'fieldIndex' => 3,
143 'type' => 'rating',
144 'label' => BackendStrings::getTemplateStrings()['overall_candidate_fit'],
145 'required' => true,
146 'defaultValue' => '',
147 'placeholder' => '',
148 'position' => 3,
149 'labelPosition' => 'default',
150 'ratingIcon' => 'star',
151 'description' => '',
152 'fieldOptions' => [
153 [
154 'id' => 8,
155 'label' => BackendStrings::getNewFormStrings()['good'],
156 'value' => '1',
157 'isDefault' => false,
158 'position' => 1
159 ],
160 [
161 'id' => 9,
162 'label' => BackendStrings::getNewFormStrings()['nice'],
163 'value' => '2',
164 'isDefault' => false,
165 'position' => 2
166 ],
167 [
168 'id' => 10,
169 'label' => BackendStrings::getNewFormStrings()['very_good'],
170 'value' => '3',
171 'isDefault' => false,
172 'position' => 3
173 ],
174 [
175 'id' => 11,
176 'label' => BackendStrings::getNewFormStrings()['awesome'],
177 'value' => '4',
178 'isDefault' => false,
179 'position' => 4
180 ],
181 [
182 'id' => 12,
183 'label' => BackendStrings::getNewFormStrings()['amazing'],
184 'value' => '5',
185 'isDefault' => false,
186 'position' => 5
187 ],
188 ],
189 'showValues' => false,
190 'showRatingText' => false,
191 ],
192 ];
193 }
194
195 /**
196 * Get key areas fields
197 *
198 * @return array<int, array<string, mixed>>
199 */
200 private static function getKeyAreasFields(): array
201 {
202 return [
203 // Key Areas Observed
204 [
205 'id' => 19,
206 'fieldIndex' => 4,
207 'type' => 'checkbox',
208 'label' => BackendStrings::getTemplateStrings()['key_areas_observed'],
209 'required' => false,
210 'parentId' => null,
211 'defaultValue' => '',
212 'placeholder' => '',
213 'position' => 4,
214 'fieldOptions' => [
215 [
216 'id' => 14,
217 'label' => BackendStrings::getTemplateStrings()['communication'],
218 'value' => 'Communication',
219 'isDefault' => false,
220 'position' => 1
221 ],
222 [
223 'id' => 15,
224 'label' => BackendStrings::getTemplateStrings()['problem_solving'],
225 'value' => 'Problem-solving',
226 'isDefault' => false,
227 'position' => 2
228 ],
229 [
230 'id' => 16,
231 'label' => BackendStrings::getTemplateStrings()['technical_or_role_specific_skills'],
232 'value' => 'Technical or role-specific skills',
233 'isDefault' => false,
234 'position' => 3
235 ],
236 [
237 'id' => 17,
238 'label' => BackendStrings::getTemplateStrings()['cultural_fit'],
239 'value' => 'Cultural fit',
240 'isDefault' => false,
241 'position' => 4
242 ],
243 [
244 'id' => 18,
245 'label' => BackendStrings::getTemplateStrings()['professionalism'],
246 'value' => 'Professionalism',
247 'isDefault' => false,
248 'position' => 5
249 ],
250 ]
251 ],
252 // Key Observations
253 [
254 'id' => 20,
255 'fieldIndex' => 5,
256 'type' => 'textarea',
257 'label' => BackendStrings::getTemplateStrings()['key_observations'],
258 'placeholder' => BackendStrings::getTemplateStrings()['key_observations_placeholder'],
259 'required' => false,
260 'parentId' => null,
261 'defaultValue' => '',
262 'position' => 5,
263 'rows' => 3,
264 ],
265 ];
266 }
267
268 /**
269 * Get recommendation fields
270 *
271 * @return array<int, array<string, mixed>>
272 */
273 private static function getRecommendationFields(): array
274 {
275 return [
276 // Recommendation
277 [
278 'id' => 25,
279 'fieldIndex' => 6,
280 'type' => 'radio',
281 'label' => BackendStrings::getTemplateStrings()['recommendation'],
282 'required' => true,
283 'parentId' => null,
284 'defaultValue' => '',
285 'placeholder' => '',
286 'position' => 6,
287 'fieldOptions' => [
288 [
289 'id' => 21,
290 'label' => BackendStrings::getTemplateStrings()['strong_hire'],
291 'value' => 'Strong hire',
292 'isDefault' => false,
293 'position' => 1
294 ],
295 [
296 'id' => 22,
297 'label' => BackendStrings::getTemplateStrings()['hire'],
298 'value' => 'Hire',
299 'isDefault' => false,
300 'position' => 2
301 ],
302 [
303 'id' => 23,
304 'label' => BackendStrings::getTemplateStrings()['consider'],
305 'value' => 'Consider',
306 'isDefault' => false,
307 'position' => 3
308 ],
309 [
310 'id' => 24,
311 'label' => BackendStrings::getTemplateStrings()['do_not_proceed'],
312 'value' => 'Do not proceed',
313 'isDefault' => false,
314 'position' => 4
315 ],
316 ]
317 ],
318 ];
319 }
320
321 /**
322 * Get interviewer information fields
323 *
324 * @return array<int, array<string, mixed>>
325 */
326 private static function getInterviewerInformationFields(): array
327 {
328 return [
329 // Interviewer Name
330 [
331 'id' => 26,
332 'fieldIndex' => 7,
333 'type' => 'name',
334 'label' => BackendStrings::getTemplateStrings()['interviewer_name'],
335 'parentId' => null,
336 'defaultValue' => '',
337 'placeholder' => '',
338 'required' => false,
339 'readonly' => false,
340 'position' => 7,
341 ],
342 // First Name - Child of Name Field
343 [
344 'id' => 27,
345 'type' => 'text',
346 'label' => BackendStrings::getNewFormStrings()['first_name'],
347 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
348 'required' => false,
349 'parentId' => 7,
350 'fieldIndex' => 7,
351 'defaultValue' => '',
352 'position' => 1,
353 'optionHide' => false,
354 'description' => '',
355 'settings' => json_encode(['nameFieldType' => 'nameField1']),
356 ],
357 // Last Name - Child of Name Field
358 [
359 'id' => 28,
360 'type' => 'text',
361 'label' => BackendStrings::getNewFormStrings()['last_name'],
362 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
363 'required' => false,
364 'parentId' => 7,
365 'fieldIndex' => 7,
366 'defaultValue' => '',
367 'position' => 2,
368 'optionHide' => false,
369 'description' => '',
370 'settings' => json_encode(['nameFieldType' => 'nameField2']),
371 ],
372 ];
373 }
374 }
375