← All changes
|
backend/src/Services/Template/GeneralChangeOrderFormTemplate.php
+50
-0
0.6.1
→
1.5
View file →
| @@ -1,0 +1,50 @@ | ||
| 1 | +<?php | |
| 2 | + | |
| 3 | +namespace IvyForms\Services\Template; | |
| 4 | + | |
| 5 | +use IvyForms\Services\Translations\BackendStrings; | |
| 6 | + | |
| 7 | +class GeneralChangeOrderFormTemplate | |
| 8 | +{ | |
| 9 | + /** | |
| 10 | + * Get template metadata (without form_data) | |
| 11 | + * | |
| 12 | + * @return array<string, mixed> | |
| 13 | + */ | |
| 14 | + public static function getTemplateMeta(): array | |
| 15 | + { | |
| 16 | + return [ | |
| 17 | + 'id' => 'general_change_order_form', | |
| 18 | + 'name' => BackendStrings::getTemplateStrings()['general_change_order_form'], | |
| 19 | + 'description' => BackendStrings::getTemplateStrings()['general_change_order_form_desc'], | |
| 20 | + 'category' => 'order-forms', | |
| 21 | + 'subcategory' => 'change-order-forms', | |
| 22 | + 'is_pro' => true, | |
| 23 | + 'required_plan' => 'essentials', | |
| 24 | + 'screenshot' => IVYFORMS_TEMPLATES_IMAGES_URL . 'general-change-order-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 | + [ | |
| 38 | + 'form_data' => [ | |
| 39 | + 'name' => BackendStrings::getTemplateStrings()['general_change_order_form'], | |
| 40 | + 'published' => 1, | |
| 41 | + 'showTitle' => 1, | |
| 42 | + 'storeEntries' => 1, | |
| 43 | + 'integrationSettings' => TemplateDefaults::getDefaultIntegrationSettings(), | |
| 44 | + 'fields' => [], | |
| 45 | + 'settings' => [] | |
| 46 | + ] | |
| 47 | + ] | |
| 48 | + ); | |
| 49 | + } | |
| 50 | +} | |