public function deleteTrashItem(APITrashItem $trashItem)
{
if ($this->repository->hasAccess('content', 'cleantrash') !== true) {
throw new UnauthorizedException('content', 'cleantrash');
}
if (!is_numeric($trashItem->id)) {
throw new InvalidArgumentValue('id', $trashItem->id, 'TrashItem');
}
$this->repository->beginTransaction();
try {
$this->persistenceHandler->trashHandler()->deleteTrashItem($trashItem->id);
$this->repository->commit();
} catch (Exception $e) {
$this->repository->rollback();
throw $e;
}
}