← All changes
|
backend/src/Services/Template/NetworkingEventFeedbackFormTemplate.php
+17
-3
1.0
→
1.5.1
View file →
| @@ -6,13 +6,13 @@ | ||
| 6 | 6 | |
| 7 | 7 | class NetworkingEventFeedbackFormTemplate |
| 8 | 8 | { |
| 9 | 9 | /** |
| 10 | - * Get the Networking Event Feedback Form template | |
| 10 | + * Get template metadata (without form_data) | |
| 11 | 11 | * |
| 12 | 12 | * @return array<string, mixed> |
| 13 | 13 | */ |
| 14 | - public static function getTemplate(): array | |
| 14 | + public static function getTemplateMeta(): array | |
| 15 | 15 | { |
| 16 | 16 | return [ |
| 17 | 17 | 'id' => 'networking_event_feedback_form', |
| 18 | 18 | 'name' => BackendStrings::getTemplateStrings()['networking_event_feedback_form'], |
| @@ -20,8 +20,21 @@ | ||
| 20 | 20 | 'category' => 'feedback-forms', |
| 21 | 21 | 'subcategory' => 'event-feedback-forms', |
| 22 | 22 | 'is_pro' => false, |
| 23 | 23 | 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'networking-event-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 | + [ | |
| 24 | 37 | 'form_data' => [ |
| 25 | 38 | 'name' => BackendStrings::getTemplateStrings()['networking_event_feedback_form'], |
| 26 | 39 | 'published' => 1, |
| 27 | 40 | 'showTitle' => 1, |
| @@ -35,9 +48,10 @@ | ||
| 35 | 48 | self::getNameField() |
| 36 | 49 | ), |
| 37 | 50 | 'settings' => [] |
| 38 | 51 | ] |
| 39 | - ]; | |
| 52 | + ] | |
| 53 | + ); | |
| 40 | 54 | } |
| 41 | 55 | |
| 42 | 56 | /** |
| 43 | 57 | * Radio: Did you make valuable connections? |