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/ConferenceRegistrationFormTemplate.php +18 -9 0.9 → 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 ConferenceRegistrationFormTemplate
13 8 {
14 9 /**
15 - * Get the conference registration 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' => 'conference_registration_form',
23 18 'name' => BackendStrings::getTemplateStrings()['conference_registration_form'],
@@ -23,9 +18,22 @@
23 18 'name' => BackendStrings::getTemplateStrings()['conference_registration_form'],
24 19 'description' => BackendStrings::getTemplateStrings()['conference_registration_form_desc'],
25 20 'category' => 'event-registration-forms',
26 21 'is_pro' => false,
27 - 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'conference-registration-form.svg',
22 + 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'conference-registration-form.svg'
23 + ];
24 + }
25 +
26 + /**
27 + * Get the full template including form data
28 + *
29 + * @return array<string, mixed>
30 + */
31 + public static function getTemplate(): array
32 + {
33 + return array_merge(
34 + self::getTemplateMeta(),
35 + [
28 36 'form_data' => [
29 37 'name' => BackendStrings::getTemplateStrings()['conference_registration_form'],
30 38 'published' => 1,
31 39 'showTitle' => 1,
@@ -39,9 +47,10 @@
39 47 self::getNotificationsPreferencesFields()
40 48 ),
41 49 'settings' => []
42 50 ]
43 - ];
51 + ]
52 + );
44 53 }
45 54
46 55 /**
47 56 * Get personal information fields