eZ\Publish\Core\Repository\TrashService::loadTrashItem PHP Method

loadTrashItem() public method

Note that $id is identical to original location, which has been previously trashed
public loadTrashItem ( mixed $trashItemId ) : eZ\Publish\API\Repository\Values\Content\TrashItem
$trashItemId mixed
return eZ\Publish\API\Repository\Values\Content\TrashItem
    public function loadTrashItem($trashItemId)
    {
        if ($this->repository->hasAccess('content', 'restore') !== true) {
            throw new UnauthorizedException('content', 'restore');
        }
        $spiTrashItem = $this->persistenceHandler->trashHandler()->loadTrashItem($trashItemId);
        $trash = $this->buildDomainTrashItemObject($spiTrashItem);
        if (!$this->repository->canUser('content', 'read', $trash->getContentInfo())) {
            throw new UnauthorizedException('content', 'read');
        }
        return $trash;
    }