eZ\Publish\Core\Persistence\Legacy\Content\Location\Trash\Handler::recover PHP Method

recover() public method

Recreates the originally trashed location in the new position. If this is not possible (because the old location does not exist any more), a ParentNotFound exception is thrown. Returns newly restored location Id.
public recover ( mixed $trashedId, mixed $newParentId ) : integer
$trashedId mixed
$newParentId mixed
return integer Newly restored location id
    public function recover($trashedId, $newParentId)
    {
        return $this->locationGateway->untrashLocation($trashedId, $newParentId)->id;
    }