# Trash events

The following events are dispatched when managing Trash.

| Event                        | Dispatched by                   | Properties                                                                    |
| ---------------------------- | ------------------------------- | ----------------------------------------------------------------------------- |
| `BeforeDeleteTrashItemEvent` | `TrashService::deleteTrashItem` | \`TrashItem $trashItem\`\`TrashItemDeleteResult                               |
| `DeleteTrashItemEvent`       | `TrashService::deleteTrashItem` | ``` TrashItem $trashItem``TrashItemDeleteResult $result ```                   |
| `BeforeEmptyTrashEvent`      | `TrashService::emptyTrash`      | \`TrashItemDeleteResultList                                                   |
| `EmptyTrashEvent`            | `TrashService::emptyTrash`      | `TrashItemDeleteResultList $resultList`                                       |
| `BeforeRecoverEvent`         | `TrashService::recover`         | \`TrashItem $trashItem`Location $newParentLocation`Location                   |
| `RecoverEvent`               | `TrashService::recover`         | ``` TrashItem $trashItem``Location $newParentLocation``Location $location ``` |
| `BeforeTrashEvent`           | `TrashService::trash`           | \`Location $location\`\`TrashItem                                             |
| `TrashEvent`                 | `TrashService::trash`           | \`Location $location\`\`TrashItem                                             |
