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/EventPhotoConsentFormTemplate.php +19 -10 0.6 → 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 EventPhotoConsentFormTemplate
13 8 {
14 9 /**
15 - * Get the event photo consent 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' => 'event_photo_consent_form',
23 18 'name' => BackendStrings::getTemplateStrings()['event_photo_consent_form'],
@@ -22,12 +17,25 @@
22 17 'id' => 'event_photo_consent_form',
23 18 'name' => BackendStrings::getTemplateStrings()['event_photo_consent_form'],
24 19 'description' => BackendStrings::getTemplateStrings()['event_photo_consent_form_desc'],
25 20 'category' => 'consent-forms',
21 + 'subcategory' => 'photo-consent-forms',
26 22 'is_pro' => true,
27 - 'demo_url' => IVYFORMS_TEMPLATES_URL . '/event-photo-consent/',
28 23 'required_plan' => 'essentials',
29 - 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'event-photo-consent-form.svg',
24 + 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'event-photo-consent-form.svg'
25 + ];
26 + }
27 +
28 + /**
29 + * Get the full template including form data
30 + *
31 + * @return array<string, mixed>
32 + */
33 + public static function getTemplate(): array
34 + {
35 + return array_merge(
36 + self::getTemplateMeta(),
37 + [
30 38 'form_data' => [
31 39 'name' => BackendStrings::getTemplateStrings()['event_photo_consent_form'],
32 40 'published' => 1,
33 41 'showTitle' => 1,
@@ -35,7 +43,8 @@
35 43 'integrationSettings' => TemplateDefaults::getDefaultIntegrationSettings(),
36 44 'fields' => [],
37 45 'settings' => []
38 46 ]
39 - ];
47 + ]
48 + );
40 49 }
41 50 }