PluginProbe
The Innovative Form Builder – IvyForms / 1.5
The Innovative Form Builder – IvyForms v1.5
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
← All changes | backend/src/Services/Template/TrainingEventFeedbackFormTemplate.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 TrainingEventFeedbackFormTemplate
13 8 {
14 9 /**
15 - * Get the Training Event 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' => 'training_event_feedback_form',
23 18 'name' => BackendStrings::getTemplateStrings()['training_event_feedback_form'],
@@ -25,8 +20,21 @@
25 20 'category' => 'feedback-forms',
26 21 'subcategory' => 'event-feedback-forms',
27 22 'is_pro' => false,
28 23 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'training-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 + [
29 37 'form_data' => [
30 38 'name' => BackendStrings::getTemplateStrings()['training_event_feedback_form'],
31 39 'published' => 1,
32 40 'showTitle' => 1,
@@ -40,9 +48,10 @@
40 48 self::getAdditionalCommentsTextareaField()
41 49 ),
42 50 'settings' => []
43 51 ]
44 - ];
52 + ]
53 + );
45 54 }
46 55
47 56 /**
48 57 * Training topic dropdown field