Rename SoftDeleteEntity -> SoftDeleteActionTrait
authorColeman Watts <coleman@civicrm.org>
Mon, 14 Mar 2022 15:18:25 +0000 (11:18 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 14 Mar 2022 15:18:25 +0000 (11:18 -0400)
The trait is used by actions, not by entities.

Civi/Api4/Action/Contact/Delete.php
Civi/Api4/Generic/Traits/SoftDeleteActionTrait.php [moved from Civi/Api4/Generic/Traits/SoftDeleteEntity.php with 88% similarity]

index 158e9dce339cc16d3217ddd1a239d16fcb78f81e..2bc03ba4c170764e332d6762225c4a3eb0599333 100644 (file)
@@ -17,7 +17,7 @@ namespace Civi\Api4\Action\Contact;
  * @inheritDoc
  */
 class Delete extends \Civi\Api4\Generic\DAODeleteAction {
-  use \Civi\Api4\Generic\Traits\SoftDeleteEntity;
+  use \Civi\Api4\Generic\Traits\SoftDeleteActionTrait;
 
   /**
    * @param $items
similarity index 88%
rename from Civi/Api4/Generic/Traits/SoftDeleteEntity.php
rename to Civi/Api4/Generic/Traits/SoftDeleteActionTrait.php
index 4ddb28848782af4bcdebfbaf6245d522c0d07e6d..3db6838afe3b94775ceaa46b3020b27c49a416c5 100644 (file)
 namespace Civi\Api4\Generic\Traits;
 
 /**
- * This trait is used by entities with a "move to trash" option.
+ * This trait is used by delete actions with a "move to trash" option.
  * @method $this setUseTrash(bool $useTrash) Pass FALSE to force delete and bypass trash
  * @method bool getUseTrash()
  */
-trait SoftDeleteEntity {
+trait SoftDeleteActionTrait {
 
   /**
    * Should $ENTITY be moved to the trash instead of permanently deleted?