SearchKit - Change @searchable annotation from boolean to option list
[civicrm-core.git] / Civi / Api4 / CustomValue.php
index ef7fdc168792c8bd582712b51180a329fccc0ed5..40b4d96160814290585125f1c32e6c7639f70c60 100644 (file)
@@ -103,22 +103,22 @@ class CustomValue {
   /**
    * @param string $customGroup
    * @param bool $checkPermissions
-   * @return Action\CustomValue\Replace
+   * @return Generic\BasicReplaceAction
    * @throws \API_Exception
    */
   public static function replace($customGroup, $checkPermissions = TRUE) {
-    return (new Action\CustomValue\Replace($customGroup, __FUNCTION__))
+    return (new Generic\BasicReplaceAction("Custom_$customGroup", __FUNCTION__, ['id', 'entity_id']))
       ->setCheckPermissions($checkPermissions);
   }
 
   /**
    * @param string $customGroup
    * @param bool $checkPermissions
-   * @return Action\CustomValue\GetActions
+   * @return Action\GetActions
    * @throws \API_Exception
    */
   public static function getActions($customGroup = NULL, $checkPermissions = TRUE) {
-    return (new Action\CustomValue\GetActions($customGroup, __FUNCTION__))
+    return (new Action\GetActions("Custom_$customGroup", __FUNCTION__))
       ->setCheckPermissions($checkPermissions);
   }
 
@@ -142,7 +142,7 @@ class CustomValue {
     return [
       'class' => __CLASS__,
       'type' => ['CustomValue'],
-      'searchable' => TRUE,
+      'searchable' => 'secondary',
       'see' => [
         'https://docs.civicrm.org/user/en/latest/organising-your-data/creating-custom-fields/#multiple-record-fieldsets',
         '\Civi\Api4\CustomGroup',