APIv4 - Remove unnecessary custom getActions class
authorColeman Watts <coleman@civicrm.org>
Wed, 28 Apr 2021 13:38:10 +0000 (09:38 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 28 Apr 2021 13:38:18 +0000 (09:38 -0400)
The class override was not needed; the generic function works fine with custom entities.

Civi/Api4/Action/CustomValue/GetActions.php [deleted file]
Civi/Api4/CustomValue.php

diff --git a/Civi/Api4/Action/CustomValue/GetActions.php b/Civi/Api4/Action/CustomValue/GetActions.php
deleted file mode 100644 (file)
index 2101ac5..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/*
- +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC. All rights reserved.                        |
- |                                                                    |
- | This work is published under the GNU AGPLv3 license with some      |
- | permitted exceptions and without any warranty. For full license    |
- | and copyright information, see https://civicrm.org/licensing       |
- +--------------------------------------------------------------------+
- */
-
-/**
- *
- * @package CRM
- * @copyright CiviCRM LLC https://civicrm.org/licensing
- */
-
-
-namespace Civi\Api4\Action\CustomValue;
-
-/**
- * @inheritDoc
- */
-class GetActions extends \Civi\Api4\Action\GetActions {
-  use \Civi\Api4\Generic\Traits\CustomValueActionTrait;
-
-}
index b5ebf0ebf27fb7b0f37be47e9ee478670b03f3ed..8b9b3411dbee39b40812966521e0c02d5d34be26 100644 (file)
@@ -114,11 +114,11 @@ class CustomValue {
   /**
    * @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);
   }