Add is empty filter to search / api
[civicrm-core.git] / Civi / Api4 / Generic / BasicGetFieldsAction.php
index 7f4faf7ae9885ea7d6831403b13b5b01e2b2832c..6999cdc20d34284be0551912f6276af222496c21 100644 (file)
@@ -125,6 +125,7 @@ class BasicGetFieldsAction extends BasicGetAction {
         'title' => empty($field['name']) ? NULL : ucwords(str_replace('_', ' ', $field['name'])),
         'entity' => $this->getEntityName(),
         'required' => FALSE,
+        'readonly' => FALSE,
         'options' => !empty($field['pseudoconstant']),
         'data_type' => \CRM_Utils_Array::value('type', $field, 'String'),
       ], array_flip($fields));
@@ -255,28 +256,29 @@ class BasicGetFieldsAction extends BasicGetAction {
         'name' => 'data_type',
         'data_type' => 'String',
         'options' => [
-          'Integer' => ts('Integer'),
+          'Array' => ts('Array'),
           'Boolean' => ts('Boolean'),
+          'Date' => ts('Date'),
+          'Float' => ts('Float'),
+          'Integer' => ts('Integer'),
           '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'),
+          'ChainSelect' => ts('ChainSelect'),
           'CheckBox' => ts('CheckBox'),
-          'Radio' => ts('Radio'),
           'Date' => ts('Date'),
-          'File' => ts('File'),
           'EntityRef' => ts('EntityRef'),
-          'ChainSelect' => ts('ChainSelect'),
+          'File' => ts('File'),
+          'Number' => ts('Number'),
+          'Radio' => ts('Radio'),
+          'Select' => ts('Select'),
+          'Text' => ts('Text'),
         ],
       ],
       [
@@ -295,6 +297,10 @@ class BasicGetFieldsAction extends BasicGetAction {
         'name' => 'entity',
         'data_type' => 'String',
       ],
+      [
+        'name' => 'readonly',
+        'data_type' => 'Boolean',
+      ],
     ];
   }