PluginProbe
The Innovative Form Builder – IvyForms / 0.9
The Innovative Form Builder – IvyForms v0.9
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 / TechnicalRoleInterviewFeedbackFormTemplate.php

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

685 lines 24.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 TechnicalRoleInterviewFeedbackFormTemplate
13 {
14 /**
15 * Get the Technical Role Interview Feedback Form template
16 *
17 * @return array<string, mixed>
18 */
19 public static function getTemplate(): array
20 {
21 return [
22 'id' => 'technical_role_interview_feedback_form',
23 'name' => BackendStrings::getTemplateStrings()['technical_role_interview_feedback_form'],
24 'description' => BackendStrings::getTemplateStrings()['technical_role_interview_feedback_form_desc'],
25 'category' => 'feedback-forms',
26 'subcategory' => 'interview-feedback-forms',
27 'is_pro' => false,
28 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'technical-role-interview-feedback-form.svg',
29 'form_data' => [
30 'name' => BackendStrings::getTemplateStrings()['technical_role_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::getRatingFields(),
38 self::getTechnicalAssessmentFields(),
39 self::getInterviewerInformationFields()
40 ),
41 'settings' => []
42 ]
43 ];
44 }
45
46 /**
47 * Get candidate information fields
48 *
49 * @return array<int, array<string, mixed>>
50 */
51 private static function getCandidateInformationFields(): array
52 {
53 return [
54 // Candidate Full Name
55 [
56 'id' => 1,
57 'fieldIndex' => 1,
58 'type' => 'name',
59 'label' => BackendStrings::getTemplateStrings()['candidate_full_name'],
60 'parentId' => null,
61 'defaultValue' => '',
62 'placeholder' => '',
63 'required' => true,
64 'readonly' => false,
65 'position' => 1,
66 ],
67 // First Name - Child of Name Field
68 [
69 'id' => 2,
70 'type' => 'text',
71 'label' => BackendStrings::getNewFormStrings()['first_name'],
72 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
73 'required' => true,
74 'parentId' => 1,
75 'fieldIndex' => 1,
76 'defaultValue' => '',
77 'position' => 1,
78 'optionHide' => false,
79 'description' => '',
80 'settings' => json_encode(['nameFieldType' => 'nameField1']),
81 ],
82 // Last Name - Child of Name Field
83 [
84 'id' => 3,
85 'type' => 'text',
86 'label' => BackendStrings::getNewFormStrings()['last_name'],
87 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
88 'required' => true,
89 'parentId' => 1,
90 'fieldIndex' => 1,
91 'defaultValue' => '',
92 'position' => 2,
93 'optionHide' => false,
94 'description' => '',
95 'settings' => json_encode(['nameFieldType' => 'nameField2']),
96 ],
97 // Role Applied For
98 [
99 'id' => 11,
100 'fieldIndex' => 2,
101 'type' => 'select',
102 'label' => BackendStrings::getTemplateStrings()['role_applied_for'],
103 'placeholder' => BackendStrings::getTemplateStrings()['select_role_applied_for'],
104 'required' => true,
105 'parentId' => null,
106 'defaultValue' => '',
107 'position' => 2,
108 'fieldOptions' => [
109 [
110 'id' => 4,
111 'label' => BackendStrings::getTemplateStrings()['frontend_developer'],
112 'value' => 'Frontend Developer',
113 'isDefault' => false,
114 'position' => 1
115 ],
116 [
117 'id' => 5,
118 'label' => BackendStrings::getTemplateStrings()['backend_developer'],
119 'value' => 'Backend Developer',
120 'isDefault' => false,
121 'position' => 2
122 ],
123 [
124 'id' => 6,
125 'label' => BackendStrings::getTemplateStrings()['fullstack_developer'],
126 'value' => 'Full-stack Developer',
127 'isDefault' => false,
128 'position' => 3
129 ],
130 [
131 'id' => 7,
132 'label' => BackendStrings::getTemplateStrings()['qa_engineer'],
133 'value' => 'QA Engineer',
134 'isDefault' => false,
135 'position' => 4
136 ],
137 [
138 'id' => 8,
139 'label' => BackendStrings::getTemplateStrings()['data_engineer_analyst'],
140 'value' => 'Data Engineer / Analyst',
141 'isDefault' => false,
142 'position' => 5
143 ],
144 [
145 'id' => 9,
146 'label' => BackendStrings::getTemplateStrings()['devops_engineer'],
147 'value' => 'DevOps Engineer',
148 'isDefault' => false,
149 'position' => 6
150 ],
151 [
152 'id' => 10,
153 'label' => BackendStrings::getTemplateStrings()['other'],
154 'value' => 'Other',
155 'isDefault' => false,
156 'position' => 7
157 ],
158 ]
159 ],
160 // Interview Stage(s)
161 [
162 'id' => 17,
163 'fieldIndex' => 3,
164 'type' => 'checkbox',
165 'label' => BackendStrings::getTemplateStrings()['interview_stages'],
166 'required' => true,
167 'parentId' => null,
168 'defaultValue' => '',
169 'placeholder' => '',
170 'position' => 3,
171 'fieldOptions' => [
172 [
173 'id' => 12,
174 'label' => BackendStrings::getTemplateStrings()['technical_screening'],
175 'value' => 'Technical screening',
176 'isDefault' => false,
177 'position' => 1
178 ],
179 [
180 'id' => 13,
181 'label' => BackendStrings::getTemplateStrings()['live_coding_interview'],
182 'value' => 'Live coding interview',
183 'isDefault' => false,
184 'position' => 2
185 ],
186 [
187 'id' => 14,
188 'label' => BackendStrings::getTemplateStrings()['system_design_interview'],
189 'value' => 'System design interview',
190 'isDefault' => false,
191 'position' => 3
192 ],
193 [
194 'id' => 15,
195 'label' => BackendStrings::getTemplateStrings()['technical_task_assignment'],
196 'value' => 'Technical task / assignment',
197 'isDefault' => false,
198 'position' => 4
199 ],
200 [
201 'id' => 16,
202 'label' => BackendStrings::getTemplateStrings()['final_technical_round'],
203 'value' => 'Final technical round',
204 'isDefault' => false,
205 'position' => 5
206 ],
207 ]
208 ],
209 ];
210 }
211
212 /**
213 * Get rating fields
214 *
215 * @return array<int, array<string, mixed>>
216 */
217 private static function getRatingFields(): array
218 {
219 return array_merge(
220 self::getTechnicalKnowledgeRating(),
221 self::getProblemSolvingApproachRating(),
222 self::getCodeQualitySolutionQualityRating(),
223 self::getSystemDesignArchitectureRating()
224 );
225 }
226
227 /**
228 * Get technical knowledge rating
229 *
230 * @return array<int, array<string, mixed>>
231 */
232 private static function getTechnicalKnowledgeRating(): array
233 {
234 return [[
235 'id' => 18,
236 'fieldIndex' => 4,
237 'type' => 'rating',
238 'label' => BackendStrings::getTemplateStrings()['technical_knowledge'],
239 'required' => true,
240 'defaultValue' => '',
241 'placeholder' => '',
242 'position' => 4,
243 'labelPosition' => 'default',
244 'ratingIcon' => 'star',
245 'description' => BackendStrings::getTemplateStrings()['technical_knowledge_desc'],
246 'fieldOptions' => self::getStandardRatingOptions(8),
247 'showValues' => false,
248 'showRatingText' => false,
249 ]];
250 }
251
252 /**
253 * Get problem-solving approach rating
254 *
255 * @return array<int, array<string, mixed>>
256 */
257 private static function getProblemSolvingApproachRating(): array
258 {
259 return [[
260 'id' => 19,
261 'fieldIndex' => 5,
262 'type' => 'rating',
263 'label' => BackendStrings::getTemplateStrings()['problem_solving_approach'],
264 'required' => true,
265 'defaultValue' => '',
266 'placeholder' => '',
267 'position' => 5,
268 'labelPosition' => 'default',
269 'ratingIcon' => 'star',
270 'description' => BackendStrings::getTemplateStrings()['problem_solving_approach_desc'],
271 'fieldOptions' => self::getStandardRatingOptions(13),
272 'showValues' => false,
273 'showRatingText' => false,
274 ]];
275 }
276
277 /**
278 * Get code quality/solution quality rating
279 *
280 * @return array<int, array<string, mixed>>
281 */
282 private static function getCodeQualitySolutionQualityRating(): array
283 {
284 return [[
285 'id' => 20,
286 'fieldIndex' => 6,
287 'type' => 'rating',
288 'label' => BackendStrings::getTemplateStrings()['code_quality_solution_quality'],
289 'required' => true,
290 'defaultValue' => '',
291 'placeholder' => '',
292 'position' => 6,
293 'labelPosition' => 'default',
294 'ratingIcon' => 'star',
295 'description' => BackendStrings::getTemplateStrings()['code_quality_solution_quality_desc'],
296 'fieldOptions' => self::getStandardRatingOptions(18),
297 'showValues' => false,
298 'showRatingText' => false,
299 ]];
300 }
301
302 /**
303 * Get system design and architecture rating
304 *
305 * @return array<int, array<string, mixed>>
306 */
307 private static function getSystemDesignArchitectureRating(): array
308 {
309 return [[
310 'id' => 21,
311 'fieldIndex' => 7,
312 'type' => 'rating',
313 'label' => BackendStrings::getTemplateStrings()['system_design_architecture'],
314 'required' => false,
315 'defaultValue' => '',
316 'placeholder' => '',
317 'position' => 7,
318 'labelPosition' => 'default',
319 'ratingIcon' => 'star',
320 'description' => BackendStrings::getTemplateStrings()['system_design_architecture_desc'],
321 'fieldOptions' => self::getStandardRatingOptions(23),
322 'showValues' => false,
323 'showRatingText' => false,
324 ]];
325 }
326
327 /**
328 * Get standard rating options
329 *
330 * @return array<int, array<string, mixed>>
331 */
332 private static function getStandardRatingOptions(int $startId): array
333 {
334 return [
335 [
336 'id' => $startId,
337 'label' => BackendStrings::getNewFormStrings()['good'],
338 'value' => '1',
339 'isDefault' => false,
340 'position' => 1
341 ],
342 [
343 'id' => $startId + 1,
344 'label' => BackendStrings::getNewFormStrings()['nice'],
345 'value' => '2',
346 'isDefault' => false,
347 'position' => 2
348 ],
349 [
350 'id' => $startId + 2,
351 'label' => BackendStrings::getNewFormStrings()['very_good'],
352 'value' => '3',
353 'isDefault' => false,
354 'position' => 3
355 ],
356 [
357 'id' => $startId + 3,
358 'label' => BackendStrings::getNewFormStrings()['awesome'],
359 'value' => '4',
360 'isDefault' => false,
361 'position' => 4
362 ],
363 [
364 'id' => $startId + 4,
365 'label' => BackendStrings::getNewFormStrings()['amazing'],
366 'value' => '5',
367 'isDefault' => false,
368 'position' => 5
369 ],
370 ];
371 }
372
373 /**
374 * Get technical assessment fields
375 *
376 * @return array<int, array<string, mixed>>
377 */
378 private static function getTechnicalAssessmentFields(): array
379 {
380 return array_merge(
381 self::getTechnicalStrengthsObservedField(),
382 self::getTechnicalConcernsField(),
383 self::getTechnicalNotesField(),
384 self::getTechnicalReadinessForRoleField(),
385 self::getTechnicalHiringRecommendationField()
386 );
387 }
388
389 /**
390 * Get technical strengths observed field
391 *
392 * @return array<int, array<string, mixed>>
393 */
394 private static function getTechnicalStrengthsObservedField(): array
395 {
396 return [[
397 'id' => 33,
398 'fieldIndex' => 8,
399 'type' => 'checkbox',
400 'label' => BackendStrings::getTemplateStrings()['technical_strengths_observed'],
401 'required' => false,
402 'parentId' => null,
403 'defaultValue' => '',
404 'placeholder' => '',
405 'position' => 8,
406 'fieldOptions' => [
407 [
408 'id' => 27,
409 'label' => BackendStrings::getTemplateStrings()['strong_fundamentals'],
410 'value' => 'Strong fundamentals',
411 'isDefault' => false,
412 'position' => 1
413 ],
414 [
415 'id' => 28,
416 'label' => BackendStrings::getTemplateStrings()['clean_readable_code'],
417 'value' => 'Clean and readable code',
418 'isDefault' => false,
419 'position' => 2
420 ],
421 [
422 'id' => 29,
423 'label' => BackendStrings::getTemplateStrings()['efficient_algorithms'],
424 'value' => 'Efficient algorithms',
425 'isDefault' => false,
426 'position' => 3
427 ],
428 [
429 'id' => 30,
430 'label' => BackendStrings::getTemplateStrings()['good_debugging_skills'],
431 'value' => 'Good debugging skills',
432 'isDefault' => false,
433 'position' => 4
434 ],
435 [
436 'id' => 31,
437 'label' => BackendStrings::getTemplateStrings()['strong_system_design_thinking'],
438 'value' => 'Strong system design thinking',
439 'isDefault' => false,
440 'position' => 5
441 ],
442 [
443 'id' => 32,
444 'label' => BackendStrings::getTemplateStrings()['knowledge_best_practices'],
445 'value' => 'Knowledge of best practices',
446 'isDefault' => false,
447 'position' => 6
448 ],
449 ]
450 ]];
451 }
452
453 /**
454 * Get technical concerns field
455 *
456 * @return array<int, array<string, mixed>>
457 */
458 private static function getTechnicalConcernsField(): array
459 {
460 return [[
461 'id' => 39,
462 'fieldIndex' => 9,
463 'type' => 'checkbox',
464 'label' => BackendStrings::getTemplateStrings()['technical_concerns'],
465 'required' => false,
466 'parentId' => null,
467 'defaultValue' => '',
468 'placeholder' => '',
469 'position' => 9,
470 'fieldOptions' => [
471 [
472 'id' => 34,
473 'label' => BackendStrings::getTemplateStrings()['gaps_core_knowledge'],
474 'value' => 'Gaps in core knowledge',
475 'isDefault' => false,
476 'position' => 1
477 ],
478 [
479 'id' => 35,
480 'label' => BackendStrings::getTemplateStrings()['inefficient_solutions'],
481 'value' => 'Inefficient solutions',
482 'isDefault' => false,
483 'position' => 2
484 ],
485 [
486 'id' => 36,
487 'label' => BackendStrings::getTemplateStrings()['poor_code_organization'],
488 'value' => 'Poor code organization',
489 'isDefault' => false,
490 'position' => 3
491 ],
492 [
493 'id' => 37,
494 'label' => BackendStrings::getTemplateStrings()['limited_experience_tools_stack'],
495 'value' => 'Limited experience with tools/stack',
496 'isDefault' => false,
497 'position' => 4
498 ],
499 [
500 'id' => 38,
501 'label' => BackendStrings::getTemplateStrings()['difficulty_explaining_decisions'],
502 'value' => 'Difficulty explaining decisions',
503 'isDefault' => false,
504 'position' => 5
505 ],
506 ]
507 ]];
508 }
509
510 /**
511 * Get technical notes field
512 *
513 * @return array<int, array<string, mixed>>
514 */
515 private static function getTechnicalNotesField(): array
516 {
517 return [[
518 'id' => 40,
519 'fieldIndex' => 10,
520 'type' => 'textarea',
521 'label' => BackendStrings::getTemplateStrings()['technical_notes'],
522 'placeholder' => BackendStrings::getTemplateStrings()['technical_notes_placeholder'],
523 'required' => false,
524 'parentId' => null,
525 'defaultValue' => '',
526 'position' => 10,
527 'rows' => 3,
528 ]];
529 }
530
531 /**
532 * Get technical readiness for role field
533 *
534 * @return array<int, array<string, mixed>>
535 */
536 private static function getTechnicalReadinessForRoleField(): array
537 {
538 return [[
539 'id' => 45,
540 'fieldIndex' => 11,
541 'type' => 'radio',
542 'label' => BackendStrings::getTemplateStrings()['technical_readiness_role'],
543 'required' => true,
544 'parentId' => null,
545 'defaultValue' => '',
546 'placeholder' => '',
547 'position' => 11,
548 'fieldOptions' => [
549 [
550 'id' => 41,
551 'label' => BackendStrings::getTemplateStrings()['exceeds_expectations'],
552 'value' => 'Exceeds expectations',
553 'isDefault' => false,
554 'position' => 1
555 ],
556 [
557 'id' => 42,
558 'label' => BackendStrings::getTemplateStrings()['meets_expectations'],
559 'value' => 'Meets expectations',
560 'isDefault' => false,
561 'position' => 2
562 ],
563 [
564 'id' => 43,
565 'label' => BackendStrings::getTemplateStrings()['partially_meets_expectations'],
566 'value' => 'Partially meets expectations',
567 'isDefault' => false,
568 'position' => 3
569 ],
570 [
571 'id' => 44,
572 'label' => BackendStrings::getTemplateStrings()['does_not_meet_expectations'],
573 'value' => 'Does not meet expectations',
574 'isDefault' => false,
575 'position' => 4
576 ],
577 ]
578 ]];
579 }
580
581 /**
582 * Get technical hiring recommendation field
583 *
584 * @return array<int, array<string, mixed>>
585 */
586 private static function getTechnicalHiringRecommendationField(): array
587 {
588 return [[
589 'id' => 50,
590 'fieldIndex' => 12,
591 'type' => 'radio',
592 'label' => BackendStrings::getTemplateStrings()['technical_hiring_recommendation'],
593 'required' => true,
594 'parentId' => null,
595 'defaultValue' => '',
596 'placeholder' => '',
597 'position' => 12,
598 'fieldOptions' => [
599 [
600 'id' => 46,
601 'label' => BackendStrings::getTemplateStrings()['strong_hire'],
602 'value' => 'Strong hire',
603 'isDefault' => false,
604 'position' => 1
605 ],
606 [
607 'id' => 47,
608 'label' => BackendStrings::getTemplateStrings()['hire'],
609 'value' => 'Hire',
610 'isDefault' => false,
611 'position' => 2
612 ],
613 [
614 'id' => 48,
615 'label' => BackendStrings::getTemplateStrings()['consider_after_improvement'],
616 'value' => 'Consider after improvement',
617 'isDefault' => false,
618 'position' => 3
619 ],
620 [
621 'id' => 49,
622 'label' => BackendStrings::getTemplateStrings()['do_not_hire'],
623 'value' => 'Do not hire',
624 'isDefault' => false,
625 'position' => 4
626 ],
627 ]
628 ]];
629 }
630
631 /**
632 * Get interviewer information fields
633 *
634 * @return array<int, array<string, mixed>>
635 */
636 private static function getInterviewerInformationFields(): array
637 {
638 return [
639 // Interviewer Name
640 [
641 'id' => 51,
642 'fieldIndex' => 13,
643 'type' => 'name',
644 'label' => BackendStrings::getTemplateStrings()['interviewer_name'],
645 'parentId' => null,
646 'defaultValue' => '',
647 'placeholder' => '',
648 'required' => false,
649 'readonly' => false,
650 'position' => 13,
651 ],
652 // First Name - Child of Name Field
653 [
654 'id' => 52,
655 'type' => 'text',
656 'label' => BackendStrings::getNewFormStrings()['first_name'],
657 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_first_name'],
658 'required' => false,
659 'parentId' => 13,
660 'fieldIndex' => 13,
661 'defaultValue' => '',
662 'position' => 1,
663 'optionHide' => false,
664 'description' => '',
665 'settings' => json_encode(['nameFieldType' => 'nameField1']),
666 ],
667 // Last Name - Child of Name Field
668 [
669 'id' => 53,
670 'type' => 'text',
671 'label' => BackendStrings::getNewFormStrings()['last_name'],
672 'placeholder' => BackendStrings::getTemplateStrings()['enter_your_last_name'],
673 'required' => false,
674 'parentId' => 13,
675 'fieldIndex' => 13,
676 'defaultValue' => '',
677 'position' => 2,
678 'optionHide' => false,
679 'description' => '',
680 'settings' => json_encode(['nameFieldType' => 'nameField2']),
681 ],
682 ];
683 }
684 }
685