PluginProbe
The Innovative Form Builder – IvyForms / 1.1.1
The Innovative Form Builder – IvyForms v1.1.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 / TechnicalRoleInterviewFeedbackFormTemplate.php

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

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