/** * Deletes a trash item. * * The corresponding content object will be removed * * @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 */ public function deleteTrashItem(TrashItem $trashItem) { $returnValue = $this->service->deleteTrashItem($trashItem); $this->signalDispatcher->emit(new DeleteTrashItemSignal(array('trashItemId' => $trashItem->id))); return $returnValue; }
/** * Deletes the given trash item. * * @param $trashItemId * * @return \eZ\Publish\Core\REST\Server\Values\NoContent */ public function deleteTrashItem($trashItemId) { $this->trashService->deleteTrashItem($this->trashService->loadTrashItem($trashItemId)); return new Values\NoContent(); }