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/SoftwarePurchaseOrderFormTemplate.php +20 -11 0.9.1 → 1.5 View file →
@@ -1,26 +1,21 @@
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
7 +class SoftwarePurchaseOrderFormTemplate
8 +{
12 9 /**
13 10 * Software Purchase Order Form Template
14 11 */
15 -class SoftwarePurchaseOrderFormTemplate
16 -{
17 12 /**
18 - * Get the template configuration
13 + * Get template metadata (without form_data)
19 14 *
20 15 * @return array<string, mixed>
21 16 */
22 - public static function getTemplate(): array
17 + public static function getTemplateMeta(): array
23 18 {
24 19 return [
25 20 'id' => 'software_purchase_order_form',
26 21 'name' => BackendStrings::getTemplateStrings()['software_purchase_order_form'],
@@ -29,9 +24,22 @@
29 24 ],
30 25 'category' => 'order-forms',
31 26 'subcategory' => 'product-order-forms',
32 27 'is_pro' => false,
33 - 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'software-purchase-order-form.svg',
28 + 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'software-purchase-order-form.svg'
29 + ];
30 + }
31 +
32 + /**
33 + * Get the full template including form data
34 + *
35 + * @return array<string, mixed>
36 + */
37 + public static function getTemplate(): array
38 + {
39 + return array_merge(
40 + self::getTemplateMeta(),
41 + [
34 42 'form_data' => [
35 43 'name' => BackendStrings::getTemplateStrings()['software_purchase_order_form'],
36 44 'published' => 1,
37 45 'showTitle' => 1,
@@ -43,9 +51,10 @@
43 51 self::getAdditionalInformationFields()
44 52 ),
45 53 'settings' => []
46 54 ]
47 - ];
55 + ]
56 + );
48 57 }
49 58
50 59 /**
51 60 * Requestor information fields (name, email, phone, department)