eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway::untrashLocation PHP Method

untrashLocation() abstract public method

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.
abstract public untrashLocation ( mixed $locationId, mixed $newParentId = null ) : eZ\Publish\SPI\Persistence\Content\Location
$locationId mixed
$newParentId mixed
return eZ\Publish\SPI\Persistence\Content\Location
    public abstract function untrashLocation($locationId, $newParentId = null);

Usage Example

Ejemplo n.º 1
0
 /**
  * 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);
     }
 }
All Usage Examples Of eZ\Publish\Core\Persistence\Legacy\Content\Location\Gateway::untrashLocation