From 1590bac6add9b94acc51c1443fcd080437e5c2e9 Mon Sep 17 00:00:00 2001 From: Maciej Kobus Date: Mon, 14 Jan 2019 11:41:16 +0100 Subject: [PATCH] EZP-29997: Exposed information about removed content items in EmptyTrashSignal and DeleteTrashItemSignal (#2520) * EZP-29997: Expose information about removed content items in EmptyTrashSignal and DeleteTrashItemSignal * EZP-29997: Fix and update unit tests * EZP-29997: Made changes according to code review * Fixed unit tests --- Repository/TrashService.php | 4 +++ .../Content/Trash/TrashItemDeleteResult.php | 29 +++++++++++++++++++ .../Trash/TrashItemDeleteResultList.php | 25 ++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 Repository/Values/Content/Trash/TrashItemDeleteResult.php create mode 100644 Repository/Values/Content/Trash/TrashItemDeleteResultList.php diff --git a/Repository/TrashService.php b/Repository/TrashService.php index 12001381e..26e1a7dd6 100644 --- a/Repository/TrashService.php +++ b/Repository/TrashService.php @@ -66,6 +66,8 @@ public function recover(TrashItem $trashItem, Location $newParentLocation = null * if all locations of the content are gone. * * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the user is not allowed to empty the trash + * + * @return \eZ\Publish\API\Repository\Values\Content\Trash\TrashItemDeleteResultList */ public function emptyTrash(); @@ -77,6 +79,8 @@ public function emptyTrash(); * @throws \eZ\Publish\API\Repository\Exceptions\UnauthorizedException if the user is not allowed to delete this trash item * * @param \eZ\Publish\API\Repository\Values\Content\TrashItem $trashItem + * + * @return \eZ\Publish\API\Repository\Values\Content\Trash\TrashItemDeleteResult */ public function deleteTrashItem(TrashItem $trashItem); diff --git a/Repository/Values/Content/Trash/TrashItemDeleteResult.php b/Repository/Values/Content/Trash/TrashItemDeleteResult.php new file mode 100644 index 000000000..45e13920b --- /dev/null +++ b/Repository/Values/Content/Trash/TrashItemDeleteResult.php @@ -0,0 +1,29 @@ +items); + } +}