Commit 73e19dc6 authored by noah's avatar noah
Browse files

document Soft Delete

parent 7e06051e
......@@ -47,7 +47,7 @@ along with some _metadata_ actions to retrieve information about the structure o
* **`delete`**
Delete one or more records based on query parameters.
Delete one or more records based on query parameters. Some entities, including `Contact`, implement "Soft Delete", in which case the `delete` action's default behavior is to give records an intermediate "trashed" status. For these entities, set `useTrash = FALSE` to delete records permanently.
* **`replace`**
......
......@@ -202,6 +202,7 @@ Basic Actions are designed to be used in 1 of 2 ways:
Parameters are `where`, `offset`, `limit`, and `orderBy`.
Internally calls `Get` to obtain records, so your entity must implement a get action.
Each will be passed into the callback via `doTask`, or you can override the `doTask` method in your custom batch class.
`Delete` actions can implement the [`SoftDelete`](https://github.com/civicrm/civicrm-core/blob/master/Civi/Api4/Generic/Traits/SoftDelete.php ) trait and default to marking records as "trashed" rather than permanently deleting them.
- [**`BasicReplaceAction`**](https://github.com/civicrm/civicrm-core/blob/master/Civi/Api4/Generic/BasicReplaceAction.php):
Used to replace a set of records. Parameters are `records`, `default`, `reload`, `where`, `offset`, `limit`, and `orderBy`.
......
......@@ -14,7 +14,7 @@ For details see [managed entity](https://github.com/civicrm/civicrm-core/pull/21
### 5.45 Contact::delete uses trash by default
For details see [pull request](https://github.com/civicrm/civicrm-core/pull/21232).
For details see [pull request](https://github.com/civicrm/civicrm-core/pull/21232) and documentation on [write actions](../v4/actions.md#write-actions) and [basic actions](../v4/architecture.md#basic-actions).
### 5.45 SortableEntity trait added with auto-weight management
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment