← All changes
|
backend/src/Services/Template/TechnicalRoleInterviewFeedbackFormTemplate.php
+17
-8
0.9.1
→
1.5
View file →
| @@ -1,23 +1,18 @@ | ||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | namespace IvyForms\Services\Template; |
| 4 | 4 | |
| 5 | -// phpcs:disable PSR1.Files.SideEffects | |
| 6 | -if (!defined('ABSPATH')) { | |
| 7 | - exit; // Exit if accessed directly | |
| 8 | -} | |
| 9 | - | |
| 10 | 5 | use IvyForms\Services\Translations\BackendStrings; |
| 11 | 6 | |
| 12 | 7 | class TechnicalRoleInterviewFeedbackFormTemplate |
| 13 | 8 | { |
| 14 | 9 | /** |
| 15 | - * Get the Technical Role Interview Feedback Form template | |
| 10 | + * Get template metadata (without form_data) | |
| 16 | 11 | * |
| 17 | 12 | * @return array<string, mixed> |
| 18 | 13 | */ |
| 19 | - public static function getTemplate(): array | |
| 14 | + public static function getTemplateMeta(): array | |
| 20 | 15 | { |
| 21 | 16 | return [ |
| 22 | 17 | 'id' => 'technical_role_interview_feedback_form', |
| 23 | 18 | 'name' => BackendStrings::getTemplateStrings()['technical_role_interview_feedback_form'], |
| @@ -25,8 +20,21 @@ | ||
| 25 | 20 | 'category' => 'feedback-forms', |
| 26 | 21 | 'subcategory' => 'interview-feedback-forms', |
| 27 | 22 | 'is_pro' => false, |
| 28 | 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 | + [ | |
| 29 | 37 | 'form_data' => [ |
| 30 | 38 | 'name' => BackendStrings::getTemplateStrings()['technical_role_interview_feedback_form'], |
| 31 | 39 | 'published' => 1, |
| 32 | 40 | 'showTitle' => 1, |
| @@ -39,9 +47,10 @@ | ||
| 39 | 47 | self::getInterviewerInformationFields() |
| 40 | 48 | ), |
| 41 | 49 | 'settings' => [] |
| 42 | 50 | ] |
| 43 | - ]; | |
| 51 | + ] | |
| 52 | + ); | |
| 44 | 53 | } |
| 45 | 54 | |
| 46 | 55 | /** |
| 47 | 56 | * Get candidate information fields |