/**
* Returns a trashed location to normal state.
*
* Recreates the originally trashed location in the new position. If no new
* position has been specified, it will be tried to re-create the location
* at the old position. If this is not possible ( because the old location
* does not exist any more) and exception is thrown.
*
* @param mixed $locationId
* @param mixed $newParentId
*
* @return \eZ\Publish\SPI\Persistence\Content\Location
*/
public function untrashLocation($locationId, $newParentId = null)
{
try {
return $this->innerGateway->untrashLocation($locationId, $newParentId);
} catch (DBALException $e) {
throw new RuntimeException('Database error', 0, $e);
} catch (PDOException $e) {
throw new RuntimeException('Database error', 0, $e);
}
}