APIv4 - Add option lists to getFields html_type and data_type
authorColeman Watts <coleman@civicrm.org>
Mon, 15 Feb 2021 00:50:24 +0000 (19:50 -0500)
committerColeman Watts <coleman@civicrm.org>
Mon, 15 Feb 2021 00:50:24 +0000 (19:50 -0500)
Civi/Api4/Generic/BasicGetFieldsAction.php

index 5f5d25ef3ded38c2c1ee0edcc212aeb6f4173030..7f4faf7ae9885ea7d6831403b13b5b01e2b2832c 100644 (file)
@@ -254,10 +254,30 @@ class BasicGetFieldsAction extends BasicGetAction {
       [
         'name' => 'data_type',
         'data_type' => 'String',
+        'options' => [
+          'Integer' => ts('Integer'),
+          'Boolean' => ts('Boolean'),
+          'String' => ts('String'),
+          'Text' => ts('Text'),
+          'Date' => ts('Date'),
+          'Timestamp' => ts('Timestamp'),
+          'Array' => ts('Array'),
+        ],
       ],
       [
         'name' => 'input_type',
         'data_type' => 'String',
+        'options' => [
+          'Text' => ts('Text'),
+          'Number' => ts('Number'),
+          'Select' => ts('Select'),
+          'CheckBox' => ts('CheckBox'),
+          'Radio' => ts('Radio'),
+          'Date' => ts('Date'),
+          'File' => ts('File'),
+          'EntityRef' => ts('EntityRef'),
+          'ChainSelect' => ts('ChainSelect'),
+        ],
       ],
       [
         'name' => 'input_attrs',